- Lists the files in the current working directory of the cartridge storage area.
- Alias for
You execute this system command at the PICO-8 prompt.
ls command of some operating systems, this command does not take arguments. To see the contents of a directory (folder) in the cartridge storage area, first use the cd command to change the current working directory, then use
dir is an alias for this command.
This command can also be used by a program as a function:
ls() The return value is a table of filenames. This returns the names of files only, and does not return subdirectories.
At the command prompt:
> cd demos > ls
-- get the list of files files = ls()