Difference between revisions of "Fs.getDir"
From ComputerCraft Wiki
MKlegoman357 (Talk | contribs) (Created page with "{{lowercase}} {{Function |name=fs.getDir |args={{Type|string}} path |api=fs |returns={{Type|string}} parent directory |addon=ComputerCraft |desc=Returns the parent directory o...") |
MKlegoman357 (Talk | contribs) m |
||
| Line 6: | Line 6: | ||
|returns={{Type|string}} parent directory | |returns={{Type|string}} parent directory | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
| − | |desc=Returns the parent directory of <var>path</var>. This is the directory a file/folder is in. | + | |desc=Returns the parent directory of <var>path</var>. This is the directory a file/folder is in. '''''Requires version 1.63 or later.''''' |
|examples= | |examples= | ||
{{Example | {{Example | ||
Revision as of 21:36, 16 April 2014
| Returns the parent directory of path. This is the directory a file/folder is in. Requires version 1.63 or later. | |
| Syntax | fs.getDir(string path) |
| Returns | string parent directory |
| Part of | ComputerCraft |
| API | fs |
Examples
| Prints the directory 'edit' program is in. | |
| Code |
print(fs.getDir("rom/programs/edit")) |
| Output | rom/programs |