Checking if the file exists

You can determine if the specified file exists by using the exists function as shown in the following example:

<cfset existresponse = cfclient.file.exists(“myNewFile.txt”)>

Method summary

exists(filePath) - check if file exists at specified location

  • returns - true/false
  • params - filePath  Absolute or relative path of the file to be checked (including file name).

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy