fs.getDir

From ComputerCraft Wiki
Jump to: navigation, search


Grid Redstone.png  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

Grid paper.png  Example
Prints the directory 'edit' program is in.
Code
print(fs.getDir("rom/programs/edit"))
Output rom/programs


Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox