isFileObject

isFileObject(filePath); → returns boolean

This function requires Adobe ColdFusion 11 and up. Not supported on Lucee, OpenBD, etc.

isFileObject Argument Reference

filePath
Required

The path to the file you are checking.

Examples sample code invoking the isFileObject function


Tag Syntax

<cfscript>
filePath = expandPath("./myfile.txt");
a = fileOpen(filePath);
b = fileRead(filePath);
writeOutput(isFileObject(a));
writeOutput(isFileObject(b));
writeOutput(getFileInfo(filePath).type);
writeOutput(structKeyExists(getFunctionList(), "isFileObject"));
</cfscript>

Fork me on GitHub