Hallo zusammen,
ich versuche gerade mit der ftp-Klasse etwas anzustellen.
Folgendes Problem tritt auf:
Ein Form enthält Script-Code, welcher zu einem ftp-Server verbindet und alle Dateien in einem Ordner anzeigt. Nun verändere ich über lade ich über einen ftp-Client eine neue Datei hoch und teste, ob das Form nun diese Datei auch "erkennt". Leider ist das nicht der Fall und erst ein Neustart des Notes-Clients zeigt die Dateien, wie sie aktuell auf dem ftp-Server vorhanden sind, an.
Nun mein Frage an Euch: Wie kann ich dieses "Caching" von Windows, Notes oder what ever verhindern oder umgehen?
Die ftp-Klasse verwendet folgende Funktionalität (ich glaube hier im Forum auch komplett ersichtlich, finde den Thread im Moment leider nicht):
Declare Private Function FtpFindFirstFile Lib "wininet.dll" Alias "FtpFindFirstFileA"
(Byval hFtpSession As Long, Byval lpszSearchFile As String, lpFindFileData As WIN32_FIND_DATA, Byval dwFlags As Long, Byval dwContent As Long) As Long
Declare Private Function FtpSetCurrentDirectory Lib "wininet.dll" Alias "FtpSetCurrentDirectoryA"
(Byval hFtpSession As Long, Byval lpszDirectory As String) As Integer
Declare Private Function FtpGetCurrentDirectory Lib "wininet.dll" Alias "FtpGetCurrentDirectoryA"
(Byval hFtpSession As Long, Byval lpszCurrentDirectory As String, lpdwCurrentDirectory As Long) As Integer
Declare Private Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA"
(Byval hFtpSession As Long, Byval lpszLocalFile As String, Byval lpszRemoteFile As String,
Byval dwFlags As Long, Byval dwContext As Long) As Integer
Declare Private Function FtpGetFile Lib "wininet.dll" Alias "FtpGetFileA"
(Byval hFtpSession As Long, Byval lpszRemoteFile As String, Byval lpszNewFile As String, Byval fFailIfExists As Integer, Byval dwFlagsAndAttributes As Long,
Byval dwFlags As Long, Byval dwContext As Long) As Integer
Declare Private Function FtpDeleteFile Lib "wininet.dll" Alias "FtpDeleteFileA"
(Byval hFtpSession As Long, Byval lpszFileName As String) As Integer
Declare Private Function FtpCreateDirectory Lib "wininet.dll" Alias "FtpCreateDirectoryA"
(Byval hConnect As Long, Byval lpszDirectory As String) As Integer
Declare Private Function FtpRenameFile Lib "wininet.dll" Alias "FtpRenameFileA"
(Byval hConnect As Long, Byval lpszExisting As String, Byval lpszNew As String) As Integer
Declare Private Function FtpRemoveDirectory Lib "wininet.dll" Alias "FtpRemoveDirectoryA"
(Byval hConnect As Long, Byval lpszDirectory As String) As Integer
Declare Private Function apiInternetCloseHandle Lib "wininet.dll" Alias "InternetCloseHandle"
(Byval hInet As Long) As Long
Declare Private Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA"
(Byval sAgent As String, Byval lAccessType As Long, Byval sProxyName As String, Byval sProxyBypass As String, Byval lFlags As Long) As Long
Declare Private Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA"
(Byval hInternetSession As Long, Byval sServerName As String, Byval nServerPort As Integer, Byval sUsername As String, Byval sPassword As String,
Byval lService As Long, Byval lFlags As Long, Byval lContext As Long) As Long
Declare Private Function InternetFindNextFile Lib "wininet.dll" Alias "InternetFindNextFileA"
(Byval hFind As Long, lpvFindData As WIN32_FIND_DATA) As Long
Gruß
Alex