Re: FTPFileSystem.RenameFile

Giganews Newsgroups
Subject: Re: FTPFileSystem.RenameFile
Posted by:  Remy Lebeau (Indy Team) (
Date: Tue, 17 Apr 2007

"Johan Nilsson" <> wrote in message

> shouldn't the TIdFTPBaseFileSystem.RenameFile include a
> ARenameFromFile-parameter?

The source filename is available in the RNFR property of the
TIdFTPServerContextBase that is passed to RenameFile().  If you look
at where TIdFTPServer is calling DoOnRenameFile(), it is passing the
RNFR property value as the ARenameFromFile parameter.  So if anything,
I would suggest removing the ARenameFromFile parameter from
TIdFTPServer.DoOnRenameFile() instead of adding an ARenameFromFile
parameter to TIdFTPBaseFileSystem.RenameFile(), ie:

    procedure TIdFTPServer.DoOnRenameFile(ASender:
TIdFTPServerContext; const ARenameToFile: string);
        if Assigned(FFTPFileSystem) then begin
            FFTPFileSystem.RenameFile(ASender, ARenameToFile);
        end else if Assigned(FOnRenameFile) then begin
            FOnRenameFile(ASender, ASender.FRNFR, ARenameToFile);



In response to

FTPFileSystem.RenameFile posted by Johan Nilsson on Tue, 17 Apr 2007