isFileObject

Checks if the given object is a filestream-object. A filestream-object you usally get, when calling fileOpen-function.

isFileObject(object); → returns boolean

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

isFileObject Argument Reference

object
Required

The object you want to check, if it is a filestream-object.

Examples sample code invoking the isFileObject function

Checks if the fileObj is a filestream-object.

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

Expected Result: true


Fork me on GitHub