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

isFileObject(object); → returns boolean

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

Argument Reference

object variableName

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

Sample code invoking the isFileObject function

Checks if the fileObj is a filestream-object.

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

Expected Result: true

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub