fsFileInfo

Obtains the date/time and size of an FTP server file.

Syntax:

fsFileInfo( client-handle, remote-file )

Parameters:

(s) client-handle: FTPS extender client handle.

(s) remote-file: name of server file to return information about.

Returns:

(s) A line-feed(@lf) delimited list of date-time and size.

The fsFileInfo function obtains modify date-time and size information for the file named in the second parameter from the FTP server associated with the client-handle parameter.

Date-time information is in  WIL YYYY:MM:DD:HH:MM:SS format. The server determines the time-zone. The file size is in bytes. The file size is represented as the text version of a floating point number.

 

client-handle

FTPS extender client handle obtain by a call to the fsClientInit function.

 

remote-file 

Use this parameter to specify the FTP server file you wish to obtain date-time and size information for. Include any necessary server path information to the targeted file to insure that the correct file is found.

Example:
  AddExtender('ilcfs44i.dll',0,'ilcfs64i.dll')
  host = 'test.example.com'
  port = 21
  user = 'demo'
  pswd  = 'password'
  
  ; Create a client
  client = fsClientInit(host, port, user, pswd)
  
  file = "images\MtStHelens.jpg"
  
  ; Download any file that mask
  info = fsFileInfo(client, file)
  
  ; Disconnect and delete from cache
  fsClientDelete(client)
  
  text = "Modify date: "
  text := ItemExtract(1, info, @lf):@lf
  text := "Size: "
  text := ItemExtract(2, info, @lf)
  
  Message(file, text) 
  Exit  
See Also:

fsClientInit, fsDirList