mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-21 08:21:32 +00:00
EIO is called IOError now
This commit is contained in:
@@ -359,7 +359,7 @@ proc parallelReplace*(s: string, subs: openArray[
|
||||
proc transformFile*(infile, outfile: string,
|
||||
subs: openArray[tuple[pattern: Regex, repl: string]]) =
|
||||
## reads in the file `infile`, performs a parallel replacement (calls
|
||||
## `parallelReplace`) and writes back to `outfile`. Raises ``EIO`` if an
|
||||
## `parallelReplace`) and writes back to `outfile`. Raises ``IOError`` if an
|
||||
## error occurs. This is supposed to be used for quick scripting.
|
||||
var x = readFile(infile).string
|
||||
writeFile(outfile, x.parallelReplace(subs))
|
||||
|
||||
Reference in New Issue
Block a user