add default file mode to newFileStream()
This commit is contained in:
parent
eed1000252
commit
ff9a3d39d7
1 changed files with 1 additions and 1 deletions
|
|
@ -391,7 +391,7 @@ when not defined(js):
|
||||||
result.writeDataImpl = fsWriteData
|
result.writeDataImpl = fsWriteData
|
||||||
result.flushImpl = fsFlush
|
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`.
|
## 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
|
## If the file cannot be opened, nil is returned. See the `system
|
||||||
## <system.html>`_ module for a list of available FileMode enums.
|
## <system.html>`_ module for a list of available FileMode enums.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue