Verification Methods

isExecutable

Returns true if the file is executable.

/**
 * @path The file path
 *
 * @throws cbfs.FileNotFoundException - If the filepath is missing
 */
boolean function isExecutable( required path );

// Example
if ( disk.isExecutable( "myFile.txt" ) ) {
    // Execute the file
}

isFile

Verifies if the passed path is an existent file.

/**
 * @path The file path
 *
 * @throws cbfs.FileNotFoundException
 */
boolean function isFile( required path );

// Example
if ( disk.isFile( "myFile.txt" ) ) {
    // Read the file
}

isHidden

Returns true if the file is hidden.

isReadable

Returns true if the file is readable.

Returns true if the file is a symbolic link.

isWritable

Returns true if the file is writable.

Last updated

Was this helpful?