0
是否可以使用FtpFindFirstFile獲取FTP服務器上的隱藏文件列表?我可以將所有文件從隱藏文件中除去。我想知道是否有我需要設置的標誌,或者如果沒有辦法使用該功能。FtpFindFirstFile和隱藏文件?
hFindConnect = InternetConnect(hInternet, mHost, INTERNET_DEFAULT_FTP_PORT, mUsername, mPassword, INTERNET_SERVICE_FTP, IIf(PassiveMode, INTERNET_FLAG_EXISTING_CONNECT Or INTERNET_FLAG_PASSIVE, INTERNET_FLAG_EXISTING_CONNECT), &H0)
If hFindConnect Then
hFind = FtpFindFirstFile(hFindConnect, sPath, WFD, INTERNET_FLAG_RELOAD Or INTERNET_FLAG_NO_CACHE_WRITE, 0&)
If hFind Then
Do
sFileName = StripNull(WFD.cFileName)
If Len(sFileName) Then
retPos = retPos + 1
If retPos > UBound(ret) Then ReDim Preserve ret(UBound(ret) * 2)
ret(retPos) = sFileName
If WFD.dwFileAttributes And vbDirectory Then ret(retPos) = ret(retPos) & "/"
End If
Loop While InternetFindNextFile(hFind, WFD)
End If
End If
Call InternetCloseHandle(hFind)
Call InternetCloseHandle(hFindConnect)