fs.getDrive
From ComputerCraft Wiki
| Returns the storage medium holding a path, or nil if the path does not exist | |
| Syntax | fs.getDrive(string path) |
| Returns | string the type of storage medium holding the path, as of ComputerCraft 1.3 one of "rom" or "hdd"[1] |
| Part of | ComputerCraft |
| API | fs |
Examples
| Checks that the standard "startup" file is stored in ROM | |
| Code |
print(fs.getDrive("rom/startup"))
|
| Output | rom |