如何检测目录是否被授权?

时间:2013-11-25 11:07:09

标签: coldfusion coldfusion-10

在下面的代码中,我正在检查目录是否存在。我还必须检查目录是否经过身份验证。我怎么能在ColdFusion中做到这一点?

<cfdirectory
    action = "list"
    directory = "#filesystem_query.folderpath#"
    name = "files"
    filter="*.*"
    type="file">
<cfset tot_file=files.recordcount>
<cfdirectory
    action = "list"
    directory = "#filesystem_query.folderpath#"
    name = "files"
    filter=""
    type="dir">
<cfset tot_folder=files.recordcount>
<cfif DirectoryExists(filesystem_query.folderpath)>
    <td>#tot_file#</td>
    <td>#tot_folder# </td>
    <td>#filesystem_query.filetype#</td>
<cfelse>
    <td colspan="3">Path not Exist</td>
</cfif>

0 个答案:

没有答案