Discuss this help topic in SecureBlackbox Forum


TElSFTPServer     See also     

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

This event is fired when your software has to rename some file.


    event TElSFTPServerRenameFileEvent OnRenameFile;
    delegate void TElSFTPServerRenameFileEvent(Object Sender, string OldPath, string NewPath, TSBSftpRenameFlags Flags, ref int ErrorCode, ref string Comment);

    Event OnRenameFile As TElSFTPServerRenameFileEvent
    Delegate Sub TElSFTPServerRenameFileEvent(ByVal Sender As Object, ByVal OldPath As String, ByVal NewPath As String, ByVal Flags As TSBSftpRenameFlags, ByRef ErrorCode As Integer, ByRef Comment As String)

    property OnRenameFile: TSBSFTPServerRenameFileEvent;
    TSBSFTPServerRenameFileEvent = procedure(Sender : TObject; const OldPath, NewPath : string; Flags : TSBSftpRenameFlags; var ErrorCode : integer; var Comment : string) of object;
    TSBSftpRenameFlags = set of TSBSftpRenameFlag;

    void get_OnRenameFile(TElSFTPServerRenameFileEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnRenameFile(TElSFTPServerRenameFileEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TElSFTPServerRenameFileEvent)(void * _ObjectData, TObjectHandle Sender, const char * pcOldPath, int32_t szOldPath, const char * pcNewPath, int32_t szNewPath, TSBSftpRenameFlagsRaw Flags, int32_t &ErrorCode, char * pcComment, int32_t &szComment);

    TElSFTPServerRenameFileEvent|callable|NULL get_OnRenameFile()
    void set_OnRenameFile(TElSFTPServerRenameFileEvent|callable|NULL $Value)
    callable TElSFTPServerRenameFileEvent(TObject $Sender, string $OldPath, string $NewPath, integer $Flags, integer &$ErrorCode, string &$Comment)


  • OldPath - path to existing file
  • NewPath - specifies the new name/location of the file
  • Flags - specifies renaming options
  • ErrorCode - the error code, see values below
  • Comment - server comment
  • pcOldPath - path to existing file
  • szOldPath - the length of pcOldPath.
  • pcNewPath - specifies the new name/location of the file
  • szNewPath - the length of pcNewPath.
  • pcComment - server comment
  • szComment - the length of pcComment.

Flags values:

TSBSftpRenameFlagsRaw values

Error codes values:


    This event is fired when the file has to be renamed.
The application can return the error code in ErrorCode parameter and textual comment in Comment parameter.

See also:     OnOpenFile     OnReadFile     OnRemove     OnWriteFile    

Discuss this help topic in SecureBlackbox Forum