Discuss this help topic in SecureBlackbox Forum

TElSFTPServer.OnRenameFile

TElSFTPServer     See also     


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


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

Declaration

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

[VB.NET]
    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)

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

[Java]
    TElSFTPServerRenameFileEvent getOnRenameFile();
    void setOnRenameFile(TElSFTPServerRenameFileEvent Value);
    TElSFTPServerRenameFileEvent.Callback OnRenameFile = new TElSFTPServerRenameFileEvent.Callback() {
        public void TElSFTPServerRenameFileEventCallback(TObject Sender, String OldPath, String NewPath, int Flags, TSBInteger ErrorCode, TSBString 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:

TSBSftpRenameFlagsRaw 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