diff options
Diffstat (limited to 'src/interp/sys-utility.boot')
-rw-r--r-- | src/interp/sys-utility.boot | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot index 2fa38afa..53114135 100644 --- a/src/interp/sys-utility.boot +++ b/src/interp/sys-utility.boot @@ -41,6 +41,7 @@ namespace BOOT module sys_-utility where probeReadableFile : %String -> %Maybe %String remove!: (%List %Thing,%Thing) -> %List %Thing + displayTextFile: %Thing -> %Void --% $COMBLOCKLIST := nil @@ -379,3 +380,11 @@ remove!(l,x) == return l p := rest p +--% +displayTextFile f == + try + stream := inputTextFile f + while (line := readLine stream) ~= %nothing repeat + writeLine(line,$OutputStream) + finally + stream ~= nil => closeStream stream |