fileSetAttribute

Description

Sets the attributes of an on-disk file in Windows. This function does not work with in-memory files.

Categories

Related

History

ColdFusion 8: Added this function.

Syntax

FileSetAttribute(filepath, attribute)

Attributes

AttributeDescriptionRequiredDefault
attributeOne of the following: readOnly hidden normal Set the attribute to normal to make a file not read-only and not hidden.
filepathAn absolute path to a file on the server.

Example

The following example sets the access mode of a file to be read-only.
<h3>FileSetAttribute Example</h3> 
 
<cfscript> 
    FileSetAttribute("c:\temp\test1.txt", "readOnly"); 
</cfscript>