Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.OnFileNameChangeNeeded

TElSimpleSFTPClient     See also     


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


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

Declaration

[C#/Java]
    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: TSBFileNameChangeNeededEvent;
    TSBFileNameChangeNeededEvent = 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)

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