Discuss this help topic in SecureBlackbox Forum

TElSFTPServer.OnCreateHardLink

TElSFTPServer     See also     


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


This event is fired when your software has to create a hard link.

Declaration

[C#]
    event TElSFTPServerCreateHardLinkEvent OnCreateHardLink;
    delegate void TElSFTPServerCreateHardLinkEvent(Object Sender, string NewLinkPath, string ExistingPath, ref int ErrorCode, ref string Comment);

[VB.NET]
    Event OnCreateHardLink As TElSFTPServerCreateHardLinkEvent
    Delegate Sub TElSFTPServerCreateHardLinkEvent(ByVal Sender As Object, ByVal NewLinkPath As String, ByVal ExistingPath As String, ByRef ErrorCode As Integer, ByRef Comment As String)

[Pascal]
    property OnCreateHardLink: TElSFTPServerCreateHardLinkEvent;
    TElSFTPServerCreateHardLinkEvent = procedure(Sender : TObject; const NewLinkPath : string;const ExistingPath : string; var ErrorCode : integer; var Comment : string) of object;

[C++]
    void get_OnCreateHardLink(TElSFTPServerCreateHardLinkEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnCreateHardLink(TElSFTPServerCreateHardLinkEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TElSFTPServerCreateHardLinkEvent)(void * _ObjectData, TObjectHandle Sender, const char * pcNewLinkPath, int32_t szNewLinkPath, const char * pcExistingPath, int32_t szExistingPath, int32_t &ErrorCode, char * pcComment, int32_t &szComment);

[PHP]
    TElSFTPServerCreateHardLinkEvent|callable|NULL get_OnCreateHardLink()
    void set_OnCreateHardLink(TElSFTPServerCreateHardLinkEvent|callable|NULL $Value)
    callable TElSFTPServerCreateHardLinkEvent(TObject $Sender, string $NewLinkPath, string $ExistingPath, integer &$ErrorCode, string &$Comment)

[Java]
    TElSFTPServerCreateHardLinkEvent getOnCreateHardLink();
    void setOnCreateHardLink(TElSFTPServerCreateHardLinkEvent Value);
    TElSFTPServerCreateHardLinkEvent.Callback OnCreateHardLink = new TElSFTPServerCreateHardLinkEvent.Callback() {
        public void TElSFTPServerCreateHardLinkEventCallback(TObject Sender, String NewLinkPath, String ExistingPath, TSBInteger ErrorCode, TSBString Comment) {
            //...
        }
    }

Parameters

  • NewLinkPath - specifies the name for a newly created hard link
  • ExistingPath - specifies the target of hard link
  • ErrorCode - the error code, see values below
  • Comment - server comment
  • pcNewLinkPath - specifies the name for a newly created hard link
  • szNewLinkPath - the length of pcNewLinkPath.
  • pcExistingPath - specifies the target of hard link
  • szExistingPath - the length of pcExistingPath.
  • pcComment - server comment
  • szComment - the length of pcComment.

Error codes values:

SSH_ERROR_FILE_IS_A_DIRECTORY 24 (0x0018) The specified file was a directory in a context where a directory cannot be used
SSH_ERROR_BYTE_RANGE_LOCK_CONFLICT 25 (0x0019) A read or write operation failed because another process's mandatory byte-range lock overlaps with the request SSH_ERROR_BYTE_RANGE_LOCK_REFUSED 26 (0x001A) A request for a byte range lock was refused SSH_ERROR_DELETE_PENDING 27 (0x001B) An operation was attempted on a file for which a delete operation is pending SSH_ERROR_FILE_CORRUPT 28 (0x001C) The file is corrupt; an filesystem integrity check should be run SSH_ERROR_OWNER_INVALID 29 (0x001D) The principal specified can not be assigned as an owner of a file SSH_ERROR_GROUP_INVALID 30 (0x001E) The principal specified can not be assigned as the primary group of a file SSH_ERROR_UNSUPPORTED_VERSION 100 (0x0064) Sets of supported by client and server versions has no intersection SSH_ERROR_INVALID_PACKET 101 (0x0065) Invalid packet was received SSH_ERROR_TUNNEL_ERROR 102 (0x0066) Error is on the SSH-protocol level. The connection is closed because of SSH error SSH_ERROR_CONNECTION_CLOSED 103 (0x0067) Connection is closed SSH_ERROR_UNSUPPORTED_ACTION 104 (0x0068) … SSH_ERROR_NOT_A_TEXT_HANDLE 105 (0x0069) … SSH_ERROR_CANCELLED_BY_USER 106 (0x006A) … Declared in [.NET] [Pascal] [C++] Namespace: SBSftpCommon
Assembly: SecureBlackbox.SFTPCommon Unit: SBSftpCommon sbsftpcommon.h

Description

This event is fired every time when new hard-link has to be created. The application can return the error code in ErrorCode parameter and textual comment in Comment parameter.

See also:     OnCreateSymLink    

Discuss this help topic in SecureBlackbox Forum