Difference between revisions of "Shell.programs"
From ComputerCraft Wiki
m (Forgot to add a space at the front to declare it as code :-/) |
Smiley43210 (Talk | contribs) (Organized the page, used Function template.) |
||
Line 1: | Line 1: | ||
− | {{ | + | {{lowercase}} |
− | + | {{Function | |
+ | |name=shell.programs | ||
+ | |args=[<nowiki></nowiki>{{type|boolean}} hidden] | ||
+ | |returns={{type|table}} programs | ||
+ | |api=Shell | ||
+ | |addon=ComputerCraft | ||
+ | |desc=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). | ||
+ | |examples= | ||
+ | {{Example | ||
+ | |desc=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. | ||
+ | }} | ||
+ | {{Example | ||
+ | |desc=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. | ||
+ | }} | ||
+ | }} | ||
− | + | [[Category:API_Functions]] | |
− | + | ||
− | + |
Revision as of 14:40, 2 May 2013
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