]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.runtime/scl/StringIO.scl
Added StringIO.readContentsWithCharset
[simantics/platform.git] / bundles / org.simantics.scl.runtime / scl / StringIO.scl
1
2 importJava "org.simantics.scl.runtime.procedure.StringIO" where
3     """
4     Reads all lines of the file whose name is given as a parameter.
5     The file contents are expected to be UTF8 encoded.
6     """
7     readLines :: String -> <Proc> [String]
8     
9     "`readLinesWithCharset \"charset\" \"file\"` reads all lines of the file whose name is given as a parameter using the given charset."
10     readLinesWithCharset :: String -> String -> <Proc> [String]
11     
12     "`readContentsWithCharset \"charset\" \"file\"` reads all lines of the file whose name is given as a parameter using the given charset."
13     readContentsWithCharset :: String -> String -> <Proc> String
14     
15     """
16     Creates a new file with the given file name whose contents are the given lines.
17     The written file will be UTF8 encoded.
18     """
19     writeLines :: String -> [String] -> <Proc> ()
20     
21     """
22     `appendLine fileName line` appends `line` to the file with name `fileName`
23     The appended content will be UTF8 encoded.
24     """
25     appendLine :: String -> String -> <Proc> ()