fs.getDir
From ComputerCraft Wiki
Revision as of 07:58, 4 August 2020 by Magiczocker (Talk | contribs)
| 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 |