fs.getDrive

From ComputerCraft Wiki
Revision as of 04:02, 12 March 2012 by Hawk777 (Talk | contribs) (Create page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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

Grid paper.png  Example
Checks that the standard "startup" file is stored in ROM
Code
print(fs.getDrive("rom/startup"))
Output rom