ASP IsRootFolder 屬性

IsRootFolder 屬性返回指定的檔夾是否為根檔夾。如果是,返回 True,否則返回 False。
語法
FolderObject.IsRootFolder
實例
<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\asp\test")
if fo.IsRootFolder=true then
Response.Write("The folder is the root folder!")
else
Response.Write("The folder is not the root folder!")
end if
set fo=nothing
set fs=nothing
%>
輸出:
The folder is not the root folder!
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\asp\test")
if fo.IsRootFolder=true then
Response.Write("The folder is the root folder!")
else
Response.Write("The folder is not the root folder!")
end if
set fo=nothing
set fs=nothing
%>
輸出:
The folder is not the root folder!
