The optional force parameter accepts a Boolean value - True allows files with read-only attributes to be deleted, while False (default) does not. Trying to delete a read-only file without setting force to True will return an error.

file

Receives a string containing the name of the file that will be deleted.

This method deletes a specified file or files (using wilcards).

Note that an error occurs if you try to delete a file that doesn't exist.