prosperon/docs/api/io.md
2024-07-03 16:38:29 -05:00

85 lines
731 B
Markdown

# io
Functions for filesystem input/output commands.
#### exists()
Returns true if a file exists.
#### ls()
List contents of the game directory.
#### cp(f1,f2)
Copy file f1 to f2.
#### mv()
Rename file f1 to f2.
#### rm(f)
Remove file f.
#### chdir()
#### mkdir()
Make dir.
#### chmod(file,mode)
#### slurp(path)
Returns the contents of given file as a string.
#### slurpbytes(path)
Return the contents of a file as a byte array.
#### slurpwrite(path, c)
Write a given string to a given file.
#### save_qoa()
#### pack_start()
#### pack_add()
#### pack_end()
#### mod()
#### dumpfolder
**string**
#### mkpath(dir)
#### extensions(ext)
#### glob(pat)
Glob files in game directory.