If the file exists, check if we have write permissions on it.

can_write(filename)

Arguments

filename

filename to test for write access

Value

TRUE if the file can be opened for writing, FALSE otherwise

Details

If the file does not exist, try creating a file of that name, and then remove it.