shell.programs

From ComputerCraft Wiki
Revision as of 14:40, 2 May 2013 by Smiley43210 (Talk | contribs) (Organized the page, used Function template.)

Jump to: navigation, search


Grid Redstone.png  Function shell.programs
Returns a table of files in the current directory and in rom/programs. If hidden is true, will also show files that begin with a period (hidden files).
Syntax shell.programs([boolean hidden])
Returns table programs
Part of ComputerCraft
API Shell

Examples

Grid paper.png  Example
The program lists files in the current directory and in rom/programs, not including files that are prefixed with a period.
Code
textutils.tabulate(shell.programs())
Output A tabulated list of programs. This is basically the 'programs' program.



Grid paper.png  Example
The program lists all files in the current directory and in rom/programs.
Code
textutils.tabulate(shell.programs(true))
Output A tabulated list of programs. This is basically the 'programs' program, but it shows hidden files too.