X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.runtime%2Fscl%2FStringIO.scl;h=a6bf0bffaf68fc347ec100e4117424bdb4fb9b40;hb=d9856d2391ee17f815a43dad74d9dc6318a1878c;hp=e30f5b6052d4b0b3a5b48ecb49b210d5cd711057;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.runtime/scl/StringIO.scl b/bundles/org.simantics.scl.runtime/scl/StringIO.scl index e30f5b605..a6bf0bffa 100644 --- a/bundles/org.simantics.scl.runtime/scl/StringIO.scl +++ b/bundles/org.simantics.scl.runtime/scl/StringIO.scl @@ -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" - readLines :: String -> [String] - - "`readLinesWithCharset \"charset\" \"file\"` reads all lines of the file whose name is given as a parameter using the given charset." - readLinesWithCharset :: String -> String -> [String] - - "Creates a new file with the given file name whose contents are the given lines." - writeLines :: String -> [String] -> () - - "`appendLine fileName line` appends `line` to the file with name `fileName`" - appendLine :: String -> String -> () + +importJava "org.simantics.scl.runtime.procedure.StringIO" where + """ + Reads all lines of the file whose name is given as a parameter. + The file contents are expected to be UTF8 encoded. + """ + readLines :: String -> [String] + + "`readLinesWithCharset \"charset\" \"file\"` reads all lines of the file whose name is given as a parameter using the given charset." + readLinesWithCharset :: String -> String -> [String] + + "`readContentsWithCharset \"charset\" \"file\"` reads all lines of the file whose name is given as a parameter using the given charset." + readContentsWithCharset :: String -> String -> 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] -> () + + """ + `appendLine fileName line` appends `line` to the file with name `fileName` + The appended content will be UTF8 encoded. + """ + appendLine :: String -> String -> ()