readonly - query whether a File
was opened
read-only
file.readonly()
Queries whether file was opened with a mode of "r" or "a" and without a mode flag of "+".
true
if file was opened with a
mode of "r" or "a" and without a
mode flag of "+", and false
otherwise
AccessCheck
if file is closed
Other errors for other read-only status queries
if (file.readonly()) { // Don't write to the file }