TAG:CFDIRECTORY
last edited by
gef
on 03-Oct-2011
|
cfdirectory
Syntax
<cfdirectory [acl="object"] [action="string"] directory="string" [filter="any"] [listinfo="string"] [mode="string"] [name="string"] [newdirectory="string"] [recurse="boolean"] [serverpassword="string"] [sort="string"] [storage="string"] [storeacl="object"] [storelocation="string"] [type="string"]>
This tag is also supported within cfscript.
<cfscript> directory [acl="object"] [action="string"] directory="string" [filter="any"] [listinfo="string"] [mode="string"] [name="string"] [newdirectory="string"] [recurse="boolean"] [serverpassword="string"] [sort="string"] [storage="string"] [storeacl="object"] [storelocation="string"] [type="string"]; </cfscript>
[] = Optional attribute
Description
Handles interactions with directories.
Body
This tag can't have a body.
Attributes
The attributes for this tag are fixed. Except for the following attributes no other attributes are allowed.
| Name | Type | Required | Description |
| acl | any | No | An array of struct where each struct represents a permission or grant. Example: [{email="xxx@yyy.com", permission="full_control"}, {group="all", permission="read"}] |
| action | string | No | Defines the action to be taken with directory(ies) specified in directory. |
| directory | string | Yes | The name of the directory to perform the action against. |
| filter | any | No | Optional for action = "list". Ignored by all other actions. File extension filter applied to.
Railo 3.3The filter also can be a function. See remarks under history. returned names. For example: *m. Only one mask filter can be applied at a time. |
| listinfo | string | No | - all: includes all information in the result set. - name: includes only filenames in the result set. |
| mode | string | No | Used with action = "Create" to define the permissions for a directory on UNIX and Linux platforms. Ignored on Windows. Options correspond to the octal values of the UNIX chmod command. From left to right, permissions are assigned for owner, group, and other. |
| name | string | No | Required for action = "list". Ignored by all other actions. Name of output query for directory listing. |
| newdirectory | string | No | Required for action = "rename". Ignored by all other actions. The new name of the directory specified in the directory attribute. |
| recurse | boolean | No | Whether Railo performs the action on subdirectories |
| serverpassword | string | No | allow you to access filesystem, also when access is denied for your context |
| sort | string | No | Optional for action = "list". Ignored by all other actions. The query columns by which to sort the directory listing. Any combination of columns from query output can be specified in comma-separated list. You can specify ASC (ascending) or DESC (descending) as qualifiers for column names. ASC is the default |
| storage | string | No | Only used for S3 Resources. The location of the created bucket/object. The location can either be EU,US or US-WEST. The default location is US. |
| storeacl | any | No | alias for attribute "acl" |
| storelocation | string | No | alias for attribute "storage" |
| type | string | No | - file: includes only filenames. - dir: includes only directory names. - all: includes both filenames and directory names. |
History
Railo 3.3: The filter attribute for the tags cfdirectory and cfobjectcache allows you to narrow down selections. You can pass in a function with this argument that defines whether an entry will match your custom filter or not. Example:
<cffunction name="filter" returntype="boolean"> <cfargument name="sql" type="string" required="yes"> <cfreturn FindNoCase("T1385",sql)> </cffunction> <cfobjectcache action="clear" filter="#filter#">
SideBar
User Login