isAvailable

isAvailable(): Boolean;

The isAvailable method of the File class returns true if the associated file of the receiver is available; that is, if the file exists and it can be accessed with the requested mode.

This method does not check that the file is in use by another user. Use the File class tryOpen method to determine if the file is in use.

The code fragment in the following example shows the use of the isAvailable method.

if file.isAvailable then
    // If the file exists, return the loaded picture
    return app.loadPicture(file.fileName);
endif;