I updated an old site to Joomla 4 and while trying to update an old component I ran across the error message "Failed deleting inaccessible file...". Forcing File::delete to log the file requested for deletion I found that the error was appearing when Joomla tried to remove non-existent files. Path::canChmod returns false if the file doesn't exist so File::delete throws an exception with the above-mentioned message. If a file is requested for deletion and it already doesn't exist, wouldn't be better if the File::delete method returned true?
surely that would just hide an error.