IsFileObject

Determine whether the given object is a BoxLang File object.

Method Signature

IsFileObject(object=[any])

Arguments

Argument
Type
Required
Description
Default

object

any

true

Object to test.

Examples

Check for a filestream-object

Checks if the fileObj is a filestream-object.

filePath = expandPath( "./myfile.txt" );
fileObj = fileOpen( filePath );
writeOutput( isFileObject( fileObj ) );

Result: true

Last updated

Was this helpful?