?
本文檔使用 php中文網(wǎng)手冊 發(fā)布
JScript? | 語言參考 |
如果指定的文件夾是根文件夾則返回 True ;否則返回 False 。
object.IsRootFolder
object 應為 Folder 對象。
下面的代碼說明了 IsRootFolder 屬性的用法:
function DisplayLevelDepth(pathspec) {
???var fso, f, n, s = "";
???fso = new ActiveXObject("Scripting.FileSystemObject");
???f = fso.GetFolder(pathspec);
???n = 0;
???if (f.IsRootFolder)
??????s = "The specified folder is the root folder."
???else
???{
??????do
??????{
?????????f = f.ParentFolder;
?????????n++;
??????}
??????while (!f.IsRootFolder)
??????s = "The specified folder is nested " + n + " levels deep."
???}
???return(s);
}
Attributes 屬性 | DateCreated 屬性 | DateLastAccessed 屬性 | DateLastModified 屬性 | Drive 屬性 | Files 屬性 | Name 屬性 | ParentFolder 屬性 | Path 屬性 | ShortName 屬性 | ShortPath 屬性 | Size 屬性 | SubFolders 屬性 | Type 屬性
應用于: Folder 對象