errorCode(): Integer;
When a file open, close, or I/O operation fails at the operating system level, the errorCode method of the File class returns the operating system error code as an integer value.
If the error is not operating system-related or if the last I/O operation was successful, this method returns zero (0).