From ff9a3d39d76602c929fcadb453a2ae2ca79559bc Mon Sep 17 00:00:00 2001 From: JamesP Date: Sat, 26 Sep 2015 08:18:42 +1000 Subject: [PATCH] add default file mode to newFileStream() --- lib/pure/streams.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim index 3be47744ca..406a0ec6e8 100644 --- a/lib/pure/streams.nim +++ b/lib/pure/streams.nim @@ -391,7 +391,7 @@ when not defined(js): result.writeDataImpl = fsWriteData result.flushImpl = fsFlush - proc newFileStream*(filename: string, mode: FileMode): FileStream = + proc newFileStream*(filename: string, mode: FileMode = fmRead): FileStream = ## creates a new stream from the file named `filename` with the mode `mode`. ## If the file cannot be opened, nil is returned. See the `system ## `_ module for a list of available FileMode enums.