Internet Direct (Indy)
Home
PreviousUpNext
TIdFTP.SetModTime Method

Sets the last modification time for the specified file.

Pascal
procedure SetModTime(
    const AFileName: String; 
    const ALocalTime: TIdDateTime
);
Parameters 
Description 
AFileName 
File name to update on the remote file system.
 
ALocalTime 
Time value to use as the last modification time. 

SetModTime is a procedure that implements support for the FTP extension command that updates the last modification time for the specified file. 

AFileName is the file name on the remote FTP server file system, and can contain absolute or relative path information. When path information is omitted, the file must be located in the current directory on the remote file system. 

ALocalTime is the native date and time value to use as the last modification time for the specified file. ALocalTime contains the last modification time expressed in the timezone for the local FTP client. 

SetModTime sends the FTP MFMT command using the value in ALocalTime converted to the GMT (UTC) timezone to perform the update for the specified file name. 

Some FTP servers have inappropriately implemented this capability using the MDTM command. While this is considered an abuse of the MDTM implementation, TIdFTP will revert to using this mechanism when the server does not implement the MFMT extension command. In this situation, the value in TZInfo may also be used when the MDTM implementation does not support the MDTM YYYYMMDDHHMMSS[+-TZ] format. 

Use SetModTimeGMT to update the last modification time using a time value expressed in the GMT (UTC) timezone. 

Use the Capabilities property or the IsExtSupported method to determine if the FTP MFMT or MDTM extension commands are supported in the FTP server implementation.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.