Discuss this help topic in SecureBlackbox Forum

TElSFTPServer.OnRenameFile

TElSFTPServer     See also     


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


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

Declaration

[C#/Java]
    event TSBSFTPServerRenameFileEvent OnRenameFile;
    delegate void TSBSFTPServerRenameFileEvent(object Sender, string OldPath, string NewPath, TSBSftpRenameFlags Flags ref int ErrorCode, ref string Comment)
    
    TSBSftpRenameFlags = int;
    TSBSftpRenameFlags represents a bit mask which contains zero or more bit flags as defined by TSBSftpRenameFlag

[VB.NET]
    Event OnRenameFile As TSBSFTPServerRenameFileEvent
    Delegate Sub TSBSFTPServerRenameFileEvent(ByVal Sender As Object, ByVal OldPath As String, ByVal NewPath As String, ByVal Flags As TSBSftpRenameFlags, ByRef ErrorCode As Integer, ByRef Comment As String)
    
    TSBSftpRenameFlags As Integer
    TSBSftpRenameFlags represents a bit mask which contains zero or more bit flags as defined by TSBSftpRenameFlag

[Pascal]
    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;

[C++]
    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);

[PHP]
    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)

Parameters

  • 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:


Error codes values:


Description

    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