summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-02-26 15:09:20 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-02-26 15:09:20 +0100
commit9d0c79ff1e55f49f59c4ec403689b8bb714da3ed (patch)
tree2a6f537cbebac780a00197719e3fcc684ed7685d
parent4b3f164368bbf93b56187633a75bce999e6514c3 (diff)
downloadNim-9d0c79ff1e55f49f59c4ec403689b8bb714da3ed.tar.gz
fixes #3901
-rw-r--r--lib/system.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim
index c28d0df8b..3ef9c1b31 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -2624,6 +2624,12 @@ when not defined(JS): #and not defined(nimscript):
       elif x > y: result = 1
       else: result = 0
 
+  when defined(nimscript):
+    proc writeFile*(filename, content: string) {.tags: [WriteIOEffect], benign.}
+      ## 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.
+
   when not defined(nimscript) and hostOS != "standalone":
     when defined(windows):
       # work-around C's sucking abstraction: