summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system.nim')
-rwxr-xr-xlib/system.nim11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 7670288fc..1837959c7 100755
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1582,10 +1582,15 @@ when not defined(EcmaScript) and not defined(NimrodVM):
     ## Flushes `f`'s buffer.
 
   proc readFile*(filename: string): string
-    ## Opens a file name `filename` for reading. Then reads the
+    ## Opens a file named `filename` for reading. Then reads the
     ## file's content completely into a string and
-    ## closes the file afterwards. Returns the string. Returns nil if there was
-    ## an error. Does not throw an IO exception.
+    ## closes the file afterwards. Returns the string. 
+    ## Raises an IO exception in case of an error.
+
+  proc writeFile*(filename, content: string)
+    ## Opens a file named `filename` for writing. Then writes the
+    ## `content` completely to the file and closes the file afterwards.
+    ## Raises an IO exception in case of an error.
 
   proc write*(f: TFile, r: float)
   proc write*(f: TFile, i: int)