fs.getDrive

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

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

fs.getDrive
Function
Syntax
fs.getDrive(
  • path : string
)

Returns string medium
API fs
Source CC:Tweaked (source)
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.