fs.getDir

From ComputerCraft
Jump to: navigation, search

fs.getDir
Function
Syntax
fs.getDir()
Returns string
API fs
Source CC:Tweaked (source)

Returns the directory part of a file.

ExampleExampleGet the directory
Get the directory of the path "/rom/programs/shell.lua" and print it.
Code
print(fs.getDir("/rom/programs/shell.lua"))
Output
/rom/programs