meta data for this page
  •  

ibec_ftp_FileDate

Description

ibec_ftp_FileDate returns the modification timestamp of a file.

Syntax

 function ibec_ftp_FileDate(FTPSession : variant; FileName : string) : variant;

ibec_ftp_FileDate returns the modification timestamp of a file specified by the FileName variable. This function returns NULL if the specified file doesn't exist or in case of any another error.

Example

FTPSession = ibec_ftp_OpenSession('HostName=myftpserver.com; UserName=me; 
                   Password=mysecret');
   try 
     if (ibec_ftp_Connect(FTPSession)) then
     begin
       if (ibec_ftp_ChangeDir(FTPSession, '\uploads')) then
       begin
         FileTS = ibec_ftp_FileDate(FTPSession, 'db.fdb'); 
         if (FileTS is not null) then
           ibec_ShowMessage('File date/time ' || FileTS);
       end;
       ibec_ftp_Disconnect(FTPSession);
     end;
   finally
     ibec_ftp_CloseSession(FTPSession); 
   end;