From 9d0c79ff1e55f49f59c4ec403689b8bb714da3ed Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 26 Feb 2016 15:09:20 +0100 Subject: [PATCH] fixes #3901 --- lib/system.nim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/system.nim b/lib/system.nim index c28d0df8bb..3ef9c1b315 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: