Difference between revisions of "Shell.programs"
From ComputerCraft Wiki
Smiley43210 (Talk | contribs) (Organized the page, used Function template.) |
MKlegoman357 (Talk | contribs) (Renamed optional argument) |
||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=shell.programs | |name=shell.programs | ||
− | |args=[<nowiki | + | |args=[<nowiki/>{{type|boolean}} showHidden] |
|returns={{type|table}} programs | |returns={{type|table}} programs | ||
|api=Shell | |api=Shell | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Returns a table of files in the current directory and in rom/programs. If '' | + | |desc=Returns a table of files in the current directory and in rom/programs. If ''showHidden'' is true, will also return files that begin with a period (hidden files). |
|examples= | |examples= | ||
{{Example | {{Example | ||
− | |desc=The program lists files in the current directory and in rom/programs, not including files that are prefixed with a period. | + | |desc=The program lists files in the current directory and in rom/programs, not including files that are prefixed with a period (hidden files). |
|code=textutils.tabulate(shell.programs()) | |code=textutils.tabulate(shell.programs()) | ||
|output=A tabulated list of programs. This is basically the 'programs' program. | |output=A tabulated list of programs. This is basically the 'programs' program. |
Latest revision as of 19:29, 4 April 2014
Function shell.programs | |
Returns a table of files in the current directory and in rom/programs. If showHidden is true, will also return files that begin with a period (hidden files). | |
Syntax | shell.programs([boolean showHidden]) |
Returns | table programs |
Part of | ComputerCraft |
API | Shell |
Examples