fs.getDir
From ComputerCraft Wiki
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 |