Difference between revisions of "Fs.isReadOnly"
From ComputerCraft Wiki
m (Moved to CAT:LuaCoreFunctions) |
m (Corrected mapping from "Boolean" to "Boolean (type)") |
||
Line 4: | Line 4: | ||
|args=[[string (type)|string]] path | |args=[[string (type)|string]] path | ||
|api=fs | |api=fs | ||
− | |returns=[[boolean]] <code>false</code> if <var>path</var> can be written to, or <var>true</var> if not | + | |returns=[[boolean_(type)|boolean]] <code>false</code> if <var>path</var> can be written to, or <var>true</var> if not |
|desc=Checks whether a path can be written to (the path need not exist in order to perform this test) | |desc=Checks whether a path can be written to (the path need not exist in order to perform this test) | ||
|examples= | |examples= |
Revision as of 13:43, 30 November 2012
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
Example | |
Checks that the "rom" directory is read-only, as its name implies | |
Code |
print(fs.isReadOnly("rom")) |
Output | true |