file

file(): File;

The file method of the FileException class returns a reference to the File or FileFolder instance that was being used when the exception was raised.

To preserve compatibility with existing application calls, this method returns a reference to a FileFolder instance if the exception was raised when using a FileFolder instance.

An exception is raised if the file cannot be opened; for example, if the file name is invalid.