© Tyl Software Foundation 2019-2021
▶ IO MODULE REFERENCE
io.append path text → text
Appends
text
at the end of the file at path
.
path
full or relative file path
text
string variable
io.copy sourcepath targetpath → text
If
targetpath
is a directory, copies the content of the file at sourcepath
to directory targetpath
, otherwise to file targetpath
.
sourcepath
full or relative file path
targetpath
full or relative file/directory path
io.delete path
Deletes the file/directory at
path
.
path
full or relative file/directory path
io.directories path → directories
path
full or relative directory path
directories
list of all directories in
path
io.exists path → result
Checks if exists file/directory at
path
.
path
full or relative file/directory path
result
TRUE if
path
exists, otherwise FALSE
io.ext path → extension
path
full or relative file path
extension
the file extension portion of
path
io.filename path → filename
path
full or relative file path
filename
file name portion of
path
, including extension
io.files path → files
path
full or relative directory path
files
list of all files in
path
io.info path → information
The information about file
path
includes: - okwhether information retrieval succeeded
- errorfailure message
- type'file'
- filenamefile name, including extension
- namefile name without extension
- extfile extension
- sizefile size in KB
- parentpathpath of parent directory
- parentnamedirectory name of parent directory
- okwhether information retrieval succeeded
- errorfailure message
- type'dir'
- namedirectory name
- parentpathpath of parent directory
- parentnamedirectory name of parent directory
path
full or relative file/directory path
information
record that contains all information about
path
io.read path → content
Reads the file at
path
and returns all file content.
path
full or relative file path
io.write path content → content
Writes
content
to the file at path
.
path
full or relative file path
content
scalar variable