in reply to Re^2: How to identify a file is in readonly mode
in thread How to identify a file is in readonly mode

Hmmm, not quite.

-w tests to see if the script is capable of writing (to) the file i.e. using the statically defined permissions on the file, not dynamically i.e. run-time determination, as required by the OP.

A user level that continues to overstate my experience :-))