Title here
Summary here
(let writeFile (fun (_name _content) (...)))
Write content to a file. Return nil
filename
: path to the file to write to (will be overwritten if it exists)content
: can be any valid ArkScript value(io:writeFile "hello.json" "{\"key\": 12}")
(let appendToFile (fun (_name _content) (...)))
Append content to a file. Return nil
filename
: path to the file to append tocontent
: can be any valid ArkScript value(io:writeFile "hello.json" "{\"key\": 12}")
(let readFile (fun (_name) (...)))
Read the content from a file as a String
filename
: the path of the file to read(io:readFile "hello.json")
(let fileExists? (fun (_name) (...)))
Check if a file exists, return True or False
filename
: the path of the file(io:fileExists? "hello.json")
(let listFiles (fun (_path) (...)))
List files in a folder, as a List of String
path
: A directory(io:listFiles "/tmp/hello")
(let dir? (fun (_path) (...)))
Check if a path represents a directory
path
: A directory(io:dir? "/tmp/hello")
(let makeDir (fun (_path) (...)))
Create a directory
path
: A directory(io:makeDir "/tmp/myDir")
(let removeFile (fun (_path) (...)))
Delete file
filename
: path to file(io:removeFile "/tmp/test.ark")