fs.getDrive

From ComputerCraft
Jump to navigation Jump to search

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

Returns the type of the medium, where the data is stored. Returns nil, if the path doesn't exists.

ExampleExampleGet the medium
Get the medium of the "/rom/programs/shell.lua" and print it.
Code
print(fs.getDrive("/rom/programs/shell.lua"))
Output
rom