The function file-writable-p
checks whether file is writable. Note that this checks the properties of the file, so trying to write to the file may still fail if the file is non-writable for other reasons, for example if it is opened for writing by another program.
LispWorks User Guide and Reference Manual - 20 Sep 2017