ASP IsRootFolder 属性

定义和用法

IsRootFolder 属性返回指定的文件夹是否为根文件夹。如果是,返回 True;否则返回 False。

语法:

  1. FolderObject.IsRootFolder

实例

  1. <%
  2. dim fs,fo
  3. set fs=Server.CreateObject("Scripting.FileSystemObject")
  4. set fo=fs.GetFolder("c:\asp\test")
  5. if fo.IsRootFolder=true then
  6. Response.Write("The folder is the root folder!")
  7. else
  8. Response.Write("The folder is not the root folder!")
  9. end if
  10. set fo=nothing
  11. set fs=nothing
  12. %>

输出:

  1. The folder is not the root folder!