vb_att23b.dat

来自「C++指令字典 一个方便的软件 用于C++指令的查询」· DAT 代码 · 共 27 行

DAT
27
字号
语法
----
object.IsRootFolder

object 总是一个 Folder 对象。


说明
----
下面的代码举例说明了 IsRootFolder 属性的用法:

Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
Sub DisplayLevelDepth(pathspec)
    Dim f, n
    Set f = fs.GetFolder(pathspec)
    If f.IsRootFolder Then
        MsgBox "The specified folder is the root folder."
    Else
        Do Until f.IsRootFolder
            Set f = f.ParentFolder
            n = n + 1
        Loop
        MsgBox "The specified folder is nested " & n & " levels deep."
    End If
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?