NAME

readonly - query whether a File was opened read-only

SYNOPSIS

file.readonly()

DESCRIPTION

Queries whether file was opened with a mode of "r" or "a" and without a mode flag of "+".

RETURN VALUE

true if file was opened with a mode of "r" or "a" and without a mode flag of "+", and false otherwise

ERRORS

AccessCheck if file is closed
Other errors for other read-only status queries

EXAMPLE

    if (file.readonly()) {
        // Don't write to the file
    }

SEE ALSO

readonly - other read-only status queries
new File