System Functions

namedescription
directoryCreateCreates on-disk or in-memory directory.
directoryDeleteDeletes on-disk or in-memory directory.
directoryExistsDetermines whether on-disk or in-memory directory exists.
directoryListLists the contents of on-disk or in-memory directory. Also lists the contents of the sub-directories if recurse is set to true.
directoryRenameRenames on-disk or in-memory directory.
dotNetToCFTypeExplicitly converts a value returned by a .NET method to the corresponding ColdFusion data type.
duplicateReturns a clone, also known as a deep copy, of a variable. There is no reference to the original variable.
expandPathCreates an absolute, platform-appropriate path that is equivalent to the value of relative_path, appended to the base path. This function (despite its name) can accept an absolute or relative path in the relative_path parameter
fileCloseCloses an on-disk or in-memory file that is open. When you use the FileOpen function, ColdFusion returns a handle to a file object.When you close the file, the handle is still available; however, it lists the file as closed.
fileCopyCopies the specified on-disk or in-memory source file to the specified destination file.
fileDeleteDeletes the specified on-disk or in-memory file on the server.
fileExistsDetermines whether an on-disk or in-memory file exists.
fileIsEOFDetermines whether ColdFusion has reached the end of an on-disk or in-memory file while reading it.
fileMoveMoves an on-disk or in-memory file from one location to another on the server.
fileOpenOpens an on-disk or in-memory file to read, write, or append. Use this function with the FileRead function to read large files.
fileReadReads an on-disk or in-memory text file or a file object created with the FileOpen function. You use this function either as an alternative to the cffile tag with the action="read" attribute. You can also use this function to improve performance when reading a large file, because FileRead does not read the entire file into memory.
fileReadBinaryReads an on-disk or in-memory binary file (such as an executable or image file) on the server, into a binary object parameter that you can use in the page. To send it through a web protocol (such as HTTP or SMTP) or store it in a database, first convert it to Base64 by using the ToBase64 function.
fileReadLineReads a line from an on-disk or in-memory file.
fileSeekSeeks the position for read or write operation of an on-disk or in-memory file on the server.
fileSetAccessModeSets the attributes of an on-disk file on UNIX or Linux. This function does not work with in-memory files.
fileSetAttributeSets the attributes of an on-disk file in Windows. This function does not work with in-memory files.
fileSetLastModifiedSets the date when an on-disk or in-memory file was most recently modified.
fileSkipBytesSkips over the data before a read or write operation of an on-disk or in-memory file on the server.
fileWriteIf you specify a file path, writes the entire content to the specified on-disk or in-memory file. If you specify a file object, writes text or binary data to the file object.
getBaseTemplatePathGets the absolute path of an application’s base page.
getContextRootReturns path to the J2EE server context root for the current request.
getCurrentTemplatePathGets the path of the page that calls this function.
getDirectoryFromPathExtracts a directory from an absolute on-disk or in-memory path.
getEncodingReturns the encoding (character set) of the Form or URL scope.
getExceptionUsed with the cftry and cfcatch tags. Retrieves a Java exception object from a Java object.
getFileFromPathExtracts a filename from an absolute on-disk or in-memory path.
getFileInfoRetrieves information about on-disk or in-memory file.
getFunctionCalledNameReturns the name of the variable used to call a defined function.
getFunctionListDisplays a list of the functions that are available in ColdFusion.
getHttpRequestDataMakes HTTP request headers and body available to CFML pages. Useful for capturing SOAP request data, which can be delivered in an HTTP header.
getLocaleGets the current ColdFusion geographic/language locale value.
getLocaleDisplayNameGets a locale value and displays the name in a manner that is appropriate to a specific locale. By default, gets the current locale in the current locale’s language.
getMetaDataGets metadata (such as the methods, properties, and parameters of a component) associated with an object that is deployed on the ColdFusion server.
getMetricDataGets server performance metrics.
getPageContextGets the current ColdFusion PageContext object that provides access to page attributes and configuration, request, and response objects.
getPrinterInfoDetermines which print attributes are supported by a selected printer.
getProfileSectionsGets all the sections of an initialization file.
getProfileStringGets an initialization file entry.
getReadableImageFormatsReturns a list of image formats that ColdFusion can read on the operating system where ColdFusion is deployed.
getTempDirectoryGets the path of the directory that ColdFusion uses for temporary files. The directory depends on the account under which ColdFusion is running and other factors. Before using this function in an application, test to determine the directory it returns under your account.
getTempFileCreates a temporary file in a directory whose name starts with (at most) the first three characters of prefix.
getTickCountReturns the current value of an internal millisecond timer.
getWriteableImageFormatsReturns a list of image formats that ColdFusion can write on the operating system where ColdFusion is deployed.
setLocaleSets the country/language locale for ColdFusion processing and the page returned to the client. The locale value determines the default format of date, time, number, and currency values, according to language and regional conventions.
setProfileStringSets the value of a profile entry in an initialization file.
sleepCauses the current thread to stop processing for a specified period of time.
writeOutputAppends text to the page-output stream.