-- 作者:lzzhx
-- 发布时间:2016/8/7 16:53:00
-- [求助]FileSys.GetDirectories问题
Public
Function FTP_Dir_bd(ByVal nd As WinForm.TreeNode,optional ByVal digui As Boolean = False)
Dim
iconfile As String = GetIconName("","文件夹")
For
Each dir1 As String In FileSys.GetDirectories(nd.fullpath)
Dim a As String =
dir1.SubString(nd.fullpath.length+1)
If nd.nodes.contains(a) = False Then \'不存在节点时执行,防止生成重复的目录树节点
Dim n As WinForm.TreeNode =
nd.nodes.add(a,a,iconfile)
If digui = True Then
FTP_dir_bd(n,True) \'递归调用
End If
End If
Next
End
Function
如上代码,取得硬盘目录都正确,但U盘的目录不正确,只取了其中一个目录,且不正确,如图,请老师看看是什么问题 此主题相关图片如下:1.png
|