1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| Private Function ListFile(pstrPath As String, psopType As SearchOption, plflMode As ListMode, Optional pstrExtension As String = "*") As ArrayList
Dim DirInfo As New IO.DirectoryInfo(pstrPath)
Dim FileInfo As IO.FileInfo() = DirInfo.GetFiles("*." & pstrExtension, psopType)
Dim FileName As IO.FileInfo
Dim arlReturn As New ArrayList
For Each FileName In FileInfo
If plflMode = ListMode.FileName Then
arlReturn.Add(FileName)
Else
arlReturn.Add(FileName.FullName)
End If
Next
Return arlReturn
End Function
|
沒有留言:
張貼留言