summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorJamesP <jlp765@gmail.com>2015-09-26 08:18:42 +1000
committerJamesP <jlp765@gmail.com>2015-09-26 08:18:42 +1000
commitff9a3d39d76602c929fcadb453a2ae2ca79559bc (patch)
tree7b162a63260be25e389e127563e05ececfe05c4e /lib/pure
parenteed1000252444850523aa5ffe7d86782bd48a26a (diff)
downloadNim-ff9a3d39d76602c929fcadb453a2ae2ca79559bc.tar.gz
add default file mode to newFileStream()
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/streams.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim
index 3be47744c..406a0ec6e 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
     ## <system.html>`_ module for a list of available FileMode enums.
153 154 155 156 157 158 159 160 161 162 163 164 165