]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.runtime/scl/StringIO.scl
Added StringIO.readContentsWithCharset
[simantics/platform.git] / bundles / org.simantics.scl.runtime / scl / StringIO.scl
index 1971afc83ad3e259dedc1b3db42f4d7daba9cf3a..a6bf0bffaf68fc347ec100e4117424bdb4fb9b40 100644 (file)
@@ -1,13 +1,25 @@
 
 importJava "org.simantics.scl.runtime.procedure.StringIO" where
-    "Reads all lines of the file whose name is given as a parameter"
+    """
+    Reads all lines of the file whose name is given as a parameter.
+    The file contents are expected to be UTF8 encoded.
+    """
     readLines :: String -> <Proc> [String]
     
     "`readLinesWithCharset \"charset\" \"file\"` reads all lines of the file whose name is given as a parameter using the given charset."
     readLinesWithCharset :: String -> String -> <Proc> [String]
     
-    "Creates a new file with the given file name whose contents are the given lines."
+    "`readContentsWithCharset \"charset\" \"file\"` reads all lines of the file whose name is given as a parameter using the given charset."
+    readContentsWithCharset :: String -> String -> <Proc> String
+    
+    """
+    Creates a new file with the given file name whose contents are the given lines.
+    The written file will be UTF8 encoded.
+    """
     writeLines :: String -> [String] -> <Proc> ()
     
-    "`appendLine fileName line` appends `line` to the file with name `fileName`"
+    """
+    `appendLine fileName line` appends `line` to the file with name `fileName`
+    The appended content will be UTF8 encoded.
+    """
     appendLine :: String -> String -> <Proc> ()