Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.OnFileNameChangeNeeded

TElSimpleSFTPClient     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


This event is fired when a file needs to be renamed.

Declaration

[C#]
    event TSBSftpFileNameChangeNeededEvent OnFileNameChangeNeeded;
    delegate void TSBSftpFileNameChangeNeededEvent(Object Sender, ref string FileName, ref bool Force);

[VB.NET]
    Event OnFileNameChangeNeeded As TSBSftpFileNameChangeNeededEvent
    Delegate Sub TSBSftpFileNameChangeNeededEvent(ByVal Sender As Object, ByRef FileName As String, ByRef Force As Boolean)

[Pascal]
    property OnFileNameChangeNeeded : TSBSftpFileNameChangeNeededEvent;
    TSBSftpFileNameChangeNeededEvent = procedure(Sender : TObject; var FileName : string; var Force : boolean) of object;

[C++]
    void get_OnFileNameChangeNeeded(TSBSftpFileNameChangeNeededEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnFileNameChangeNeeded(TSBSftpFileNameChangeNeededEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TSBSftpFileNameChangeNeededEvent)(void * _ObjectData, TObjectHandle Sender, char * pcFileName, int32_t &szFileName, int8_t &Force);

[PHP]
    TSBSftpFileNameChangeNeededEvent|callable|NULL get_OnFileNameChangeNeeded()
    void set_OnFileNameChangeNeeded(TSBSftpFileNameChangeNeededEvent|callable|NULL $Value)
    callable TSBSftpFileNameChangeNeededEvent(TObject $Sender, string &$FileName, bool &$Force)

[Java]
    TSBSftpFileNameChangeNeededEvent getOnFileNameChangeNeeded();
    void setOnFileNameChangeNeeded(TSBSftpFileNameChangeNeededEvent Value);
    TSBSftpFileNameChangeNeededEvent.Callback OnFileNameChangeNeeded = new TSBSftpFileNameChangeNeededEvent.Callback() {
        public void TSBSftpFileNameChangeNeededEventCallback(TObject Sender, String[] FileName, TSBBoolean Force) {
            //...
        }
    }

Parameters

  • FileName - the new name for the file has to be passed via this parameter. When an empty string is passed, the operation is cancelled.
  • Force - set this property to True to force rename.
  • pcFileName - the new name for the file has to be passed via this parameter. When an empty string is passed, the operation is cancelled.
  • szFileName - the length of pcFileName.

Description

    This event is fired by TElSimpleSFTPClient from DownloadFiles and UploadFiles methods when the component has encountered a file with the same name aither locally or on the server side. Depending on the file transfer mode, one of the files needs to be renamed. The handler should provide new file name via the corresponding parameter; when an empty string is passed, the operation is cancelled.

See also:     DownloadFiles     UploadFiles    

Discuss this help topic in SecureBlackbox Forum