From 9427724a718ece9396d85fe8fa6a604b59f6bfd7 Mon Sep 17 00:00:00 2001 From: Dmitry Atamanov Date: Mon, 17 Jul 2017 11:09:54 +0500 Subject: [PATCH] Fix (#6093) --- lib/pure/streams.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim index 438b48beba..69f6739903 100644 --- a/lib/pure/streams.nim +++ b/lib/pure/streams.nim @@ -411,12 +411,12 @@ when not defined(js): result.writeDataImpl = fsWriteData result.flushImpl = fsFlush - proc newFileStream*(filename: string, mode: FileMode = fmRead): FileStream = + proc newFileStream*(filename: string, mode: FileMode = fmRead, bufSize: int = -1): 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. var f: File - if open(f, filename, mode): result = newFileStream(f) + if open(f, filename, mode, bufSize): result = newFileStream(f) when true: