Muy buenas, tengo problemas a la hora de recoger la fecha y hora de un fichero en un servidor ftp mediante esta funcion.
method ReadFiles( cMask ) class CDIftp
local hFTPDir, aFiles := {}
local oWin32FindData, cBuffer
DEFAULT cMask := "*.*"
STRUCT oWin32FindData
MEMBER nFileAttributes AS DWORD
MEMBER nCreationTime AS STRING LEN 9
MEMBER nLastReadAccess AS STRING LEN 8
MEMBER nLastWriteAccess AS STRING LEN 8
MEMBER nSizeHight AS DWORD
MEMBER nSizeLow AS DWORD
MEMBER nReserved0 AS DWORD
MEMBER nReserved1 AS DWORD
MEMBER cFileName AS STRING LEN 260
MEMBER cAltName AS STRING LEN 14
ENDSTRUCT
if ::oFTP != nil
cBuffer = oWin32FindData:cBuffer
hFTPDir = FtpFindFirstFile( ::oFTP, cMask, @cBuffer, 0, 0 )
oWin32FindData:cBuffer = cBuffer
if ! Empty( oWin32FindData:cFileName )
AAdd( aFiles, { oWin32FindData:cFileName,;
oWin32FindData:nSizeLow,;
oWin32FindData:nLastWriteAccess,;
oWin32FindData:nCreationTime,;
oWin32FindData:nFileAttributes} )
while InternetFindNextFile( hFTPDir, @cBuffer )
oWin32FindData:cBuffer = cBuffer
AAdd( aFiles, { oWin32FindData:cFileName,;
oWin32FindData:nSizeLow,;
oWin32FindData:nLastWriteAccess,;
oWin32FindData:nCreationTime,;
oWin32FindData:nFileAttributes } )
end
end if
InternetCloseHandle( hFTPDir )
end if
return aFiles
Lo que me sucede es que los datos
oWin32FindData:nLastWriteAccess,;
oWin32FindData:nCreationTime,;
están vacios y en el servidor ftp el archivo tiene hora y fecha.
¿Sabeis como puedo conseguir estos datos?
Un Saludo.