Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cooldome committed Jan 4, 2020
1 parent 2a66099 commit 6248992
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/system/io.nim
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ proc writeFile*(filename: string, content: openArray[byte]) {.since: (1, 1).} =
else:
raise newException(IOError, "cannot open: " & filename)

proc readLines*(filename: string, n = 1.Natural): seq[TaintedString] =
proc readLines*(filename: string, n: Natural): seq[TaintedString] =
## read `n` lines from the file named `filename`. Raises an IO exception
## in case of an error. Raises EOF if file does not contain at least `n` lines.
## Available at compile time. A line of text may be delimited by ``LF`` or ``CRLF``.
Expand All @@ -713,6 +713,8 @@ proc readLines*(filename: string, n = 1.Natural): seq[TaintedString] =
else:
sysFatal(IOError, "cannot open: " & filename)

proc readLines*(filename: string): seq[TaintedString] {.deprecated: "use readLines with two arguments".}


iterator lines*(filename: string): TaintedString {.tags: [ReadIOEffect].} =
## Iterates over any line in the file named `filename`.
Expand Down

0 comments on commit 6248992

Please sign in to comment.