fs.exists

From ComputerCraft Wiki
Revision as of 03:55, 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.exists
Checks whether a file or directory exists
Syntax fs.exists(string path)
Returns boolean true if path is an existing file or directory, or false if not
Part of ComputerCraft
API fs

Examples

Grid paper.png  Example
Checks that the "rom" directory exists
Code
print(fs.exists("rom"))
Output true