From 12c95f31dcd6587d09f9eeedfd58d1ec96189abd Mon Sep 17 00:00:00 2001 From: Grzegorz Adam Hankiewicz Date: Thu, 20 Feb 2014 23:32:03 +0100 Subject: [PATCH] Documents system.readAll() limitations. Refs #298. --- lib/system.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/system.nim b/lib/system.nim index 2acb989c5f..b683a49551 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2014,8 +2014,10 @@ when not defined(JS): #and not defined(NimrodVM): ## Flushes `f`'s buffer. proc readAll*(file: TFile): TaintedString {.tags: [FReadIO].} - ## Reads all data from the stream `file`. Raises an IO exception - ## in case of an error + ## Reads all data from the stream `file`. + ## + ## Raises an IO exception in case of an error. It is an error if the + ## current file position is not at the beginning of the file. proc readFile*(filename: string): TaintedString {.tags: [FReadIO].} ## Opens a file named `filename` for reading. Then calls `readAll`