Difference between revisions of "Fs.getDir"
From ComputerCraft Wiki
MKlegoman357 (Talk | contribs) m |
Magiczocker (Talk | contribs) m |
||
Line 13: | Line 13: | ||
|output=rom/programs}} | |output=rom/programs}} | ||
}} | }} | ||
+ | [[Category:API Functions]] |
Latest revision as of 07:58, 4 August 2020
Function fs.getDir | |
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
Example | |
Prints the directory 'edit' program is in. | |
Code |
print(fs.getDir("rom/programs/edit")) |
Output | rom/programs |