Wiki
Clone wikiaequery / misc / file
aeq.readFile(filepath)
aeq.readFile(string)
aeq.readFile(File)
- Description:
- Opens a file and returns its contents. If the file does not exist it returns
null
.
- Opens a file and returns its contents. If the file does not exist it returns
- Parameters:
filepath
: String/File object. The path to the file to read, or the File object to read.
- Returns:
- A string with the contents with the file.
aeq.writeFile(filepath, contents)
aeq.writeFile(string, string)
aeq.writeFile(File, string)
- Description:
- Opens a file and write contents to it. It also creates folders if they do not exists. If the file exists, the contents of the file gets overwritten.
- Parameters:
filepath
: String/File object. The path to the file to read, or the File object to write to.contents
: String. The contents to write to file.
- Returns:
true
if the write was successful,false
otherwise.
Updated