fs.isReadOnly

From ComputerCraft Wiki
Revision as of 13:43, 30 November 2012 by AfterLifeLochie (Talk | contribs) (Corrected mapping from "Boolean" to "Boolean (type)")

Jump to: navigation, search


Grid Redstone.png  Function fs.isReadOnly
Checks whether a path can be written to (the path need not exist in order to perform this test)
Syntax fs.isReadOnly(string path)
Returns boolean false if path can be written to, or true if not
Part of ComputerCraft
API fs

Examples

Grid paper.png  Example
Checks that the "rom" directory is read-only, as its name implies
Code
print(fs.isReadOnly("rom"))
Output true