unit Chilkat.SFtp;

{
  Pascal wrapper for Chilkat SFtp.
  Auto-generated by PascalWrapperGenerator -- do not edit manually.
}

{$IFDEF FPC}
  {$MODE DELPHI}
{$ENDIF}

interface

uses
  SysUtils,
  Chilkat.Base;

type

  { TSFtp wraps CkSFtp via the C bridge layer. }
  TSFtp = class(TChilkatBase)
  private
    FOnAbortCheck: TChilkatAbortCheckEvent;
    FOnPercentDone: TChilkatPercentDoneEvent;
    FOnProgressInfo: TChilkatProgressInfoEvent;
    function  GetLastErrorHtml: string;
    function  GetLastErrorText: string;
    function  GetLastErrorXml: string;
    function  GetVersion: string;
    function  GetDebugLogFilePath: string;
    procedure SetDebugLogFilePath(AValue: string);
    function  GetVerboseLogging: Boolean;
    procedure SetVerboseLogging(AValue: Boolean);
    function  GetLastMethodSuccess: Boolean;
    procedure SetLastMethodSuccess(AValue: Boolean);
    function  GetAuthFailReason: Integer;
    function  GetBandwidthThrottleDown: Integer;
    procedure SetBandwidthThrottleDown(AValue: Integer);
    function  GetBandwidthThrottleUp: Integer;
    procedure SetBandwidthThrottleUp(AValue: Integer);
    function  GetClientIdentifier: string;
    procedure SetClientIdentifier(AValue: string);
    function  GetClientIpAddress: string;
    procedure SetClientIpAddress(AValue: string);
    function  GetConnectTimeoutMs: Integer;
    procedure SetConnectTimeoutMs(AValue: Integer);
    function  GetDisconnectCode: Integer;
    function  GetDisconnectReason: string;
    function  GetEnableCache: Boolean;
    procedure SetEnableCache(AValue: Boolean);
    function  GetEnableCompression: Boolean;
    procedure SetEnableCompression(AValue: Boolean);
    function  GetFilenameCharset: string;
    procedure SetFilenameCharset(AValue: string);
    function  GetForceCipher: string;
    procedure SetForceCipher(AValue: string);
    function  GetForceV3: Boolean;
    procedure SetForceV3(AValue: Boolean);
    function  GetHeartbeatMs: Integer;
    procedure SetHeartbeatMs(AValue: Integer);
    function  GetHostKeyAlg: string;
    procedure SetHostKeyAlg(AValue: string);
    function  GetHostKeyFingerprint: string;
    function  GetHttpProxyAuthMethod: string;
    procedure SetHttpProxyAuthMethod(AValue: string);
    function  GetHttpProxyDomain: string;
    procedure SetHttpProxyDomain(AValue: string);
    function  GetHttpProxyHostname: string;
    procedure SetHttpProxyHostname(AValue: string);
    function  GetHttpProxyPassword: string;
    procedure SetHttpProxyPassword(AValue: string);
    function  GetHttpProxyPort: Integer;
    procedure SetHttpProxyPort(AValue: Integer);
    function  GetHttpProxyUsername: string;
    procedure SetHttpProxyUsername(AValue: string);
    function  GetIdleTimeoutMs: Integer;
    procedure SetIdleTimeoutMs(AValue: Integer);
    function  GetIncludeDotDirs: Boolean;
    procedure SetIncludeDotDirs(AValue: Boolean);
    function  GetInitializeFailCode: Integer;
    function  GetInitializeFailReason: string;
    function  GetIsConnected: Boolean;
    function  GetKeepSessionLog: Boolean;
    procedure SetKeepSessionLog(AValue: Boolean);
    function  GetMaxPacketSize: Integer;
    procedure SetMaxPacketSize(AValue: Integer);
    function  GetPasswordChangeRequested: Boolean;
    function  GetPercentDoneScale: Integer;
    procedure SetPercentDoneScale(AValue: Integer);
    function  GetPreferIpv6: Boolean;
    procedure SetPreferIpv6(AValue: Boolean);
    function  GetPreserveDate: Boolean;
    procedure SetPreserveDate(AValue: Boolean);
    function  GetProtocolVersion: Integer;
    function  GetReadDirMustMatch: string;
    procedure SetReadDirMustMatch(AValue: string);
    function  GetReadDirMustNotMatch: string;
    procedure SetReadDirMustNotMatch(AValue: string);
    function  GetSessionLog: string;
    function  GetSoRcvBuf: Integer;
    procedure SetSoRcvBuf(AValue: Integer);
    function  GetSoSndBuf: Integer;
    procedure SetSoSndBuf(AValue: Integer);
    function  GetSocksHostname: string;
    procedure SetSocksHostname(AValue: string);
    function  GetSocksPassword: string;
    procedure SetSocksPassword(AValue: string);
    function  GetSocksPort: Integer;
    procedure SetSocksPort(AValue: Integer);
    function  GetSocksUsername: string;
    procedure SetSocksUsername(AValue: string);
    function  GetSocksVersion: Integer;
    procedure SetSocksVersion(AValue: Integer);
    function  GetSyncMustMatch: string;
    procedure SetSyncMustMatch(AValue: string);
    function  GetSyncMustNotMatch: string;
    procedure SetSyncMustNotMatch(AValue: string);
    function  GetTcpNoDelay: Boolean;
    procedure SetTcpNoDelay(AValue: Boolean);
    function  GetUploadChunkSize: Integer;
    procedure SetUploadChunkSize(AValue: Integer);
    function  GetUtcMode: Boolean;
    procedure SetUtcMode(AValue: Boolean);
    function  GetAbortCurrent: Boolean;
    procedure SetAbortCurrent(AValue: Boolean);
    function  GetSyncDirectives: string;
    procedure SetSyncDirectives(AValue: string);
    function  GetXferByteCount: LongWord;
    function  GetXferByteCount64: Int64;
    function  GetServerIdentifier: string;
    function  GetUncommonOptions: string;
    procedure SetUncommonOptions(AValue: string);
    function  GetSyncMustMatchDir: string;
    procedure SetSyncMustMatchDir(AValue: string);
    function  GetSyncMustNotMatchDir: string;
    procedure SetSyncMustNotMatchDir(AValue: string);
    function  GetSyncCreateAllLocalDirs: Boolean;
    procedure SetSyncCreateAllLocalDirs(AValue: Boolean);
    function  GetLastStatusCode: Integer;
    function  GetLastStatusMessage: string;
    function  GetUserAuthBanner: string;
    procedure SetUserAuthBanner(AValue: string);
    function  GetEnableSecrets: Boolean;
    procedure SetEnableSecrets(AValue: Boolean);
    procedure SetOnAbortCheck(AValue: TChilkatAbortCheckEvent);
    procedure SetOnPercentDone(AValue: TChilkatPercentDoneEvent);
    procedure SetOnProgressInfo(AValue: TChilkatProgressInfoEvent);
  public
    constructor Create;
    destructor  Destroy; override;

    property LastErrorHtml: string read GetLastErrorHtml;
    property LastErrorText: string read GetLastErrorText;
    property LastErrorXml: string read GetLastErrorXml;
    property Version: string read GetVersion;
    property DebugLogFilePath: string read GetDebugLogFilePath write SetDebugLogFilePath;
    property VerboseLogging: Boolean read GetVerboseLogging write SetVerboseLogging;
    property LastMethodSuccess: Boolean read GetLastMethodSuccess write SetLastMethodSuccess;
    property AuthFailReason: Integer read GetAuthFailReason;
    property BandwidthThrottleDown: Integer read GetBandwidthThrottleDown write SetBandwidthThrottleDown;
    property BandwidthThrottleUp: Integer read GetBandwidthThrottleUp write SetBandwidthThrottleUp;
    property ClientIdentifier: string read GetClientIdentifier write SetClientIdentifier;
    property ClientIpAddress: string read GetClientIpAddress write SetClientIpAddress;
    property ConnectTimeoutMs: Integer read GetConnectTimeoutMs write SetConnectTimeoutMs;
    property DisconnectCode: Integer read GetDisconnectCode;
    property DisconnectReason: string read GetDisconnectReason;
    property EnableCache: Boolean read GetEnableCache write SetEnableCache;
    property EnableCompression: Boolean read GetEnableCompression write SetEnableCompression;
    property FilenameCharset: string read GetFilenameCharset write SetFilenameCharset;
    property ForceCipher: string read GetForceCipher write SetForceCipher;
    property ForceV3: Boolean read GetForceV3 write SetForceV3;
    property HeartbeatMs: Integer read GetHeartbeatMs write SetHeartbeatMs;
    property HostKeyAlg: string read GetHostKeyAlg write SetHostKeyAlg;
    property HostKeyFingerprint: string read GetHostKeyFingerprint;
    property HttpProxyAuthMethod: string read GetHttpProxyAuthMethod write SetHttpProxyAuthMethod;
    property HttpProxyDomain: string read GetHttpProxyDomain write SetHttpProxyDomain;
    property HttpProxyHostname: string read GetHttpProxyHostname write SetHttpProxyHostname;
    property HttpProxyPassword: string read GetHttpProxyPassword write SetHttpProxyPassword;
    property HttpProxyPort: Integer read GetHttpProxyPort write SetHttpProxyPort;
    property HttpProxyUsername: string read GetHttpProxyUsername write SetHttpProxyUsername;
    property IdleTimeoutMs: Integer read GetIdleTimeoutMs write SetIdleTimeoutMs;
    property IncludeDotDirs: Boolean read GetIncludeDotDirs write SetIncludeDotDirs;
    property InitializeFailCode: Integer read GetInitializeFailCode;
    property InitializeFailReason: string read GetInitializeFailReason;
    property IsConnected: Boolean read GetIsConnected;
    property KeepSessionLog: Boolean read GetKeepSessionLog write SetKeepSessionLog;
    property MaxPacketSize: Integer read GetMaxPacketSize write SetMaxPacketSize;
    property PasswordChangeRequested: Boolean read GetPasswordChangeRequested;
    property PercentDoneScale: Integer read GetPercentDoneScale write SetPercentDoneScale;
    property PreferIpv6: Boolean read GetPreferIpv6 write SetPreferIpv6;
    property PreserveDate: Boolean read GetPreserveDate write SetPreserveDate;
    property ProtocolVersion: Integer read GetProtocolVersion;
    property ReadDirMustMatch: string read GetReadDirMustMatch write SetReadDirMustMatch;
    property ReadDirMustNotMatch: string read GetReadDirMustNotMatch write SetReadDirMustNotMatch;
    property SessionLog: string read GetSessionLog;
    property SoRcvBuf: Integer read GetSoRcvBuf write SetSoRcvBuf;
    property SoSndBuf: Integer read GetSoSndBuf write SetSoSndBuf;
    property SocksHostname: string read GetSocksHostname write SetSocksHostname;
    property SocksPassword: string read GetSocksPassword write SetSocksPassword;
    property SocksPort: Integer read GetSocksPort write SetSocksPort;
    property SocksUsername: string read GetSocksUsername write SetSocksUsername;
    property SocksVersion: Integer read GetSocksVersion write SetSocksVersion;
    property SyncMustMatch: string read GetSyncMustMatch write SetSyncMustMatch;
    property SyncMustNotMatch: string read GetSyncMustNotMatch write SetSyncMustNotMatch;
    property TcpNoDelay: Boolean read GetTcpNoDelay write SetTcpNoDelay;
    property UploadChunkSize: Integer read GetUploadChunkSize write SetUploadChunkSize;
    property UtcMode: Boolean read GetUtcMode write SetUtcMode;
    property AbortCurrent: Boolean read GetAbortCurrent write SetAbortCurrent;
    property SyncDirectives: string read GetSyncDirectives write SetSyncDirectives;
    property XferByteCount: LongWord read GetXferByteCount;
    property XferByteCount64: Int64 read GetXferByteCount64;
    property ServerIdentifier: string read GetServerIdentifier;
    property UncommonOptions: string read GetUncommonOptions write SetUncommonOptions;
    property SyncMustMatchDir: string read GetSyncMustMatchDir write SetSyncMustMatchDir;
    property SyncMustNotMatchDir: string read GetSyncMustNotMatchDir write SetSyncMustNotMatchDir;
    property SyncCreateAllLocalDirs: Boolean read GetSyncCreateAllLocalDirs write SetSyncCreateAllLocalDirs;
    property LastStatusCode: Integer read GetLastStatusCode;
    property LastStatusMessage: string read GetLastStatusMessage;
    property UserAuthBanner: string read GetUserAuthBanner write SetUserAuthBanner;
    property EnableSecrets: Boolean read GetEnableSecrets write SetEnableSecrets;

    { Event callbacks.  Return True from OnAbortCheck / OnPercentDone
      to abort the running method.  Callbacks are invoked on the
      thread that called the Chilkat method.  The HeartbeatMs
      property controls the AbortCheck frequency. }
    property OnAbortCheck: TChilkatAbortCheckEvent read FOnAbortCheck write SetOnAbortCheck;
    property OnPercentDone: TChilkatPercentDoneEvent read FOnPercentDone write SetOnPercentDone;
    property OnProgressInfo: TChilkatProgressInfoEvent read FOnProgressInfo write SetOnProgressInfo;

    function  AuthenticatePk(const username: string; privateKey: TChilkatBase): Boolean;
    function  AuthenticatePw(const login: string; const password: string): Boolean;
    function  AuthenticatePwPk(const username: string; const password: string; privateKey: TChilkatBase): Boolean;
    procedure ClearCache;
    procedure ClearSessionLog;
    function  CloseHandle(const handle: string): Boolean;
    function  Connect(const domainName: string; port: Integer): Boolean;
    function  ConnectThroughSsh(sshConn: TChilkatBase; const hostname: string; port: Integer): Boolean;
    function  CopyFileAttr(const localFilename: string; const remoteFilename: string; isHandle: Boolean): Boolean;
    function  CreateDir(const path: string): Boolean;
    procedure Disconnect;
    function  DownloadFile(const handle: string; const toFilename: string): Boolean;
    function  DownloadFileByName(const remoteFilePath: string; const localFilePath: string): Boolean;
    function  Eof(const handle: string): Boolean;
    function  GetFileCreateTimeStr(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): string;
    function  GetFileGroup(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): string;
    function  GetFileLastAccessStr(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): string;
    function  GetFileLastModifiedStr(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): string;
    function  GetFileOwner(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): string;
    function  GetFilePermissions(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): Integer;
    function  GetFileSize32(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): Integer;
    function  GetFileSize64(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): Int64;
    function  GetFileSizeStr(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): string;
    function  InitializeSftp: Boolean;
    function  LastReadFailed(const handle: string): Boolean;
    function  LastReadNumBytes(const handle: string): Integer;
    function  OpenDir(const path: string): string;
    function  OpenFile(const remotePath: string; const access: string; const createDisposition: string): string;
    function  ReadFileText(const handle: string; numBytes: Integer; const charset: string): string;
    function  ReadFileText32(const handle: string; offset: Integer; numBytes: Integer; const charset: string): string;
    function  ReadFileText64(const handle: string; offset: Int64; numBytes: Integer; const charset: string): string;
    function  ReadFileText64s(const handle: string; const offset: string; numBytes: Integer; const charset: string): string;
    function  RealPath(const originalPath: string; const composePath: string): string;
    function  RemoveDir(const path: string): Boolean;
    function  RemoveFile(const filename: string): Boolean;
    function  RenameFileOrDir(const oldPath: string; const newPath: string): Boolean;
    function  ResumeDownloadFileByName(const remoteFilePath: string; const localFilePath: string): Boolean;
    function  ResumeUploadFileByName(const remoteFilePath: string; const localFilePath: string): Boolean;
    function  SetCreateDt(const pathOrHandle: string; isHandle: Boolean; createDateTime: TChilkatBase): Boolean;
    function  SetCreateTimeStr(const pathOrHandle: string; bIsHandle: Boolean; const dateTimeStr: string): Boolean;
    function  SetLastAccessDt(const pathOrHandle: string; isHandle: Boolean; accessDateTime: TChilkatBase): Boolean;
    function  SetLastAccessTimeStr(const pathOrHandle: string; bIsHandle: Boolean; const dateTimeStr: string): Boolean;
    function  SetLastModifiedDt(const pathOrHandle: string; isHandle: Boolean; modifiedDateTime: TChilkatBase): Boolean;
    function  SetLastModifiedTimeStr(const pathOrHandle: string; bIsHandle: Boolean; const dateTimeStr: string): Boolean;
    function  SetOwnerAndGroup(const pathOrHandle: string; isHandle: Boolean; const owner: string; const group: string): Boolean;
    function  SetPermissions(const pathOrHandle: string; isHandle: Boolean; permissions: Integer): Boolean;
    function  SyncTreeDownload(const remoteRoot: string; const localRoot: string; mode: Integer; recurse: Boolean): Boolean;
    function  SyncTreeUpload(const localBaseDir: string; const remoteBaseDir: string; mode: Integer; bRecurse: Boolean): Boolean;
    function  UploadFile(const handle: string; const fromLocalFilePath: string): Boolean;
    function  UploadFileByName(const remoteFilePath: string; const localFilePath: string): Boolean;
    function  WriteFileText(const handle: string; const charset: string; const textData: string): Boolean;
    function  WriteFileText32(const handle: string; offset32: Integer; const charset: string; const textData: string): Boolean;
    function  WriteFileText64(const handle: string; offset64: Int64; const charset: string; const textData: string): Boolean;
    function  WriteFileText64s(const handle: string; const offset64: string; const charset: string; const textData: string): Boolean;
    function  UploadSb(sb: TChilkatBase; const remoteFilePath: string; const charset: string; includeBom: Boolean): Boolean;
    function  UploadBd(binData: TChilkatBase; const remoteFilePath: string): Boolean;
    function  DownloadBd(const remoteFilePath: string; binData: TChilkatBase): Boolean;
    function  DownloadSb(const remoteFilePath: string; const charset: string; sb: TChilkatBase): Boolean;
    function  SendIgnore: Boolean;
    function  FileExists(const remotePath: string; followLinks: Boolean): Integer;
    function  AuthenticateSecPw(login: TChilkatBase; password: TChilkatBase): Boolean;
    function  AuthenticateSecPwPk(username: TChilkatBase; password: TChilkatBase; privateKey: TChilkatBase): Boolean;
    function  SymLink(const oldPath: string; const newPath: string): Boolean;
    function  HardLink(const oldPath: string; const newPath: string): Boolean;
    function  Fsync(const handle: string): Boolean;
    function  ReadLink(const path: string): string;
    function  WriteFileBd(const handle: string; bd: TChilkatBase): Boolean;
    function  ReadFileBd(const handle: string; numBytes: Integer; bd: TChilkatBase): Boolean;
    function  StartKeyboardAuth(const login: string): string;
    function  ContinueKeyboardAuth(const response: string): string;
    function  GetHostKeyFP(const hashAlg: string; includeKeyType: Boolean; includeHashName: Boolean): string;
    function  SetAllowedAlgorithms(json: TChilkatBase): Boolean;
    procedure GetSyncedFiles(strTab: TChilkatBase);
    procedure GetLastJsonData(json: TChilkatBase);
    function  ReadDirListing(const handle: string; dirObj: TChilkatBase): Boolean;
  end;

implementation

uses
  CkDllLoader,
  Chilkat.Utils;

{ ---- C bridge function pointer types ---- }
type
  TCkSFtp_Create  = function(): Pointer; cdecl;
  TCkSFtp_Dispose = procedure(handle: Pointer); cdecl;
  TCkBridgeAbortCheckCb   = function(userData: Pointer): Integer; cdecl;
  TCkBridgePercentDoneCb  = function(pctDone: Integer; userData: Pointer): Integer; cdecl;
  TCkBridgeProgressInfoCb = procedure(name: PAnsiChar; value: PAnsiChar; userData: Pointer); cdecl;
  TCkSFtp_SetAbortCheckCallback   = procedure(handle: Pointer; cb: TCkBridgeAbortCheckCb; userData: Pointer); cdecl;
  TCkSFtp_SetPercentDoneCallback  = procedure(handle: Pointer; cb: TCkBridgePercentDoneCb; userData: Pointer); cdecl;
  TCkSFtp_SetProgressInfoCallback = procedure(handle: Pointer; cb: TCkBridgeProgressInfoCb; userData: Pointer); cdecl;
  TCkSFtp_get_LastErrorHtml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_get_LastErrorText = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_get_LastErrorXml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_get_Version = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_get_DebugLogFilePath = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_DebugLogFilePath = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_VerboseLogging = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_VerboseLogging = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_get_LastMethodSuccess = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_LastMethodSuccess = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_get_AuthFailReason = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_get_BandwidthThrottleDown = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_put_BandwidthThrottleDown = procedure(handle: Pointer; value: Integer); cdecl;
  TCkSFtp_get_BandwidthThrottleUp = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_put_BandwidthThrottleUp = procedure(handle: Pointer; value: Integer); cdecl;
  TCkSFtp_get_ClientIdentifier = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_ClientIdentifier = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_ClientIpAddress = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_ClientIpAddress = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_ConnectTimeoutMs = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_put_ConnectTimeoutMs = procedure(handle: Pointer; value: Integer); cdecl;
  TCkSFtp_get_DisconnectCode = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_get_DisconnectReason = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_get_EnableCache = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_EnableCache = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_get_EnableCompression = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_EnableCompression = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_get_FilenameCharset = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_FilenameCharset = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_ForceCipher = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_ForceCipher = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_ForceV3 = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_ForceV3 = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_get_HeartbeatMs = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_put_HeartbeatMs = procedure(handle: Pointer; value: Integer); cdecl;
  TCkSFtp_get_HostKeyAlg = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_HostKeyAlg = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_HostKeyFingerprint = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_get_HttpProxyAuthMethod = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_HttpProxyAuthMethod = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_HttpProxyDomain = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_HttpProxyDomain = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_HttpProxyHostname = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_HttpProxyHostname = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_HttpProxyPassword = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_HttpProxyPassword = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_HttpProxyPort = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_put_HttpProxyPort = procedure(handle: Pointer; value: Integer); cdecl;
  TCkSFtp_get_HttpProxyUsername = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_HttpProxyUsername = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_IdleTimeoutMs = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_put_IdleTimeoutMs = procedure(handle: Pointer; value: Integer); cdecl;
  TCkSFtp_get_IncludeDotDirs = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_IncludeDotDirs = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_get_InitializeFailCode = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_get_InitializeFailReason = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_get_IsConnected = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_get_KeepSessionLog = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_KeepSessionLog = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_get_MaxPacketSize = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_put_MaxPacketSize = procedure(handle: Pointer; value: Integer); cdecl;
  TCkSFtp_get_PasswordChangeRequested = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_get_PercentDoneScale = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_put_PercentDoneScale = procedure(handle: Pointer; value: Integer); cdecl;
  TCkSFtp_get_PreferIpv6 = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_PreferIpv6 = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_get_PreserveDate = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_PreserveDate = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_get_ProtocolVersion = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_get_ReadDirMustMatch = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_ReadDirMustMatch = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_ReadDirMustNotMatch = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_ReadDirMustNotMatch = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_SessionLog = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_get_SoRcvBuf = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_put_SoRcvBuf = procedure(handle: Pointer; value: Integer); cdecl;
  TCkSFtp_get_SoSndBuf = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_put_SoSndBuf = procedure(handle: Pointer; value: Integer); cdecl;
  TCkSFtp_get_SocksHostname = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_SocksHostname = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_SocksPassword = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_SocksPassword = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_SocksPort = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_put_SocksPort = procedure(handle: Pointer; value: Integer); cdecl;
  TCkSFtp_get_SocksUsername = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_SocksUsername = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_SocksVersion = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_put_SocksVersion = procedure(handle: Pointer; value: Integer); cdecl;
  TCkSFtp_get_SyncMustMatch = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_SyncMustMatch = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_SyncMustNotMatch = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_SyncMustNotMatch = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_TcpNoDelay = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_TcpNoDelay = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_get_UploadChunkSize = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_put_UploadChunkSize = procedure(handle: Pointer; value: Integer); cdecl;
  TCkSFtp_get_UtcMode = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_UtcMode = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_get_AbortCurrent = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_AbortCurrent = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_get_SyncDirectives = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_SyncDirectives = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_XferByteCount = function(handle: Pointer): LongWord; cdecl;
  TCkSFtp_get_XferByteCount64 = function(handle: Pointer): Int64; cdecl;
  TCkSFtp_get_ServerIdentifier = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_get_UncommonOptions = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_UncommonOptions = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_SyncMustMatchDir = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_SyncMustMatchDir = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_SyncMustNotMatchDir = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_SyncMustNotMatchDir = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_SyncCreateAllLocalDirs = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_SyncCreateAllLocalDirs = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_get_LastStatusCode = function(handle: Pointer): Integer; cdecl;
  TCkSFtp_get_LastStatusMessage = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_get_UserAuthBanner = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtp_put_UserAuthBanner = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtp_get_EnableSecrets = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_put_EnableSecrets = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtp_AuthenticatePk = function(handle: Pointer; username: PAnsiChar; privateKey: Pointer): LongBool; cdecl;
  TCkSFtp_AuthenticatePw = function(handle: Pointer; login: PAnsiChar; password: PAnsiChar): LongBool; cdecl;
  TCkSFtp_AuthenticatePwPk = function(handle: Pointer; username: PAnsiChar; password: PAnsiChar; privateKey: Pointer): LongBool; cdecl;
  TCkSFtp_ClearCache = procedure(handle: Pointer); cdecl;
  TCkSFtp_ClearSessionLog = procedure(handle: Pointer); cdecl;
  TCkSFtp_CloseHandle = function(handle: Pointer; handle: PAnsiChar): LongBool; cdecl;
  TCkSFtp_Connect = function(handle: Pointer; domainName: PAnsiChar; port: Integer): LongBool; cdecl;
  TCkSFtp_ConnectThroughSsh = function(handle: Pointer; sshConn: Pointer; hostname: PAnsiChar; port: Integer): LongBool; cdecl;
  TCkSFtp_CopyFileAttr = function(handle: Pointer; localFilename: PAnsiChar; remoteFilename: PAnsiChar; isHandle: LongBool): LongBool; cdecl;
  TCkSFtp_CreateDir = function(handle: Pointer; path: PAnsiChar): LongBool; cdecl;
  TCkSFtp_Disconnect = procedure(handle: Pointer); cdecl;
  TCkSFtp_DownloadFile = function(handle: Pointer; handle: PAnsiChar; toFilename: PAnsiChar): LongBool; cdecl;
  TCkSFtp_DownloadFileByName = function(handle: Pointer; remoteFilePath: PAnsiChar; localFilePath: PAnsiChar): LongBool; cdecl;
  TCkSFtp_Eof = function(handle: Pointer; handle: PAnsiChar): LongBool; cdecl;
  TCkSFtp_GetFileCreateTimeStr = function(handle: Pointer; pathOrHandle: PAnsiChar; bFollowLinks: LongBool; bIsHandle: LongBool): PAnsiChar; cdecl;
  TCkSFtp_GetFileGroup = function(handle: Pointer; pathOrHandle: PAnsiChar; bFollowLinks: LongBool; bIsHandle: LongBool): PAnsiChar; cdecl;
  TCkSFtp_GetFileLastAccessStr = function(handle: Pointer; pathOrHandle: PAnsiChar; bFollowLinks: LongBool; bIsHandle: LongBool): PAnsiChar; cdecl;
  TCkSFtp_GetFileLastModifiedStr = function(handle: Pointer; pathOrHandle: PAnsiChar; bFollowLinks: LongBool; bIsHandle: LongBool): PAnsiChar; cdecl;
  TCkSFtp_GetFileOwner = function(handle: Pointer; pathOrHandle: PAnsiChar; bFollowLinks: LongBool; bIsHandle: LongBool): PAnsiChar; cdecl;
  TCkSFtp_GetFilePermissions = function(handle: Pointer; pathOrHandle: PAnsiChar; bFollowLinks: LongBool; bIsHandle: LongBool): Integer; cdecl;
  TCkSFtp_GetFileSize32 = function(handle: Pointer; pathOrHandle: PAnsiChar; bFollowLinks: LongBool; bIsHandle: LongBool): Integer; cdecl;
  TCkSFtp_GetFileSize64 = function(handle: Pointer; pathOrHandle: PAnsiChar; bFollowLinks: LongBool; bIsHandle: LongBool): Int64; cdecl;
  TCkSFtp_GetFileSizeStr = function(handle: Pointer; pathOrHandle: PAnsiChar; bFollowLinks: LongBool; bIsHandle: LongBool): PAnsiChar; cdecl;
  TCkSFtp_InitializeSftp = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_LastReadFailed = function(handle: Pointer; handle: PAnsiChar): LongBool; cdecl;
  TCkSFtp_LastReadNumBytes = function(handle: Pointer; handle: PAnsiChar): Integer; cdecl;
  TCkSFtp_OpenDir = function(handle: Pointer; path: PAnsiChar): PAnsiChar; cdecl;
  TCkSFtp_OpenFile = function(handle: Pointer; remotePath: PAnsiChar; access: PAnsiChar; createDisposition: PAnsiChar): PAnsiChar; cdecl;
  TCkSFtp_ReadFileText = function(handle: Pointer; handle: PAnsiChar; numBytes: Integer; charset: PAnsiChar): PAnsiChar; cdecl;
  TCkSFtp_ReadFileText32 = function(handle: Pointer; handle: PAnsiChar; offset: Integer; numBytes: Integer; charset: PAnsiChar): PAnsiChar; cdecl;
  TCkSFtp_ReadFileText64 = function(handle: Pointer; handle: PAnsiChar; offset: Int64; numBytes: Integer; charset: PAnsiChar): PAnsiChar; cdecl;
  TCkSFtp_ReadFileText64s = function(handle: Pointer; handle: PAnsiChar; offset: PAnsiChar; numBytes: Integer; charset: PAnsiChar): PAnsiChar; cdecl;
  TCkSFtp_RealPath = function(handle: Pointer; originalPath: PAnsiChar; composePath: PAnsiChar): PAnsiChar; cdecl;
  TCkSFtp_RemoveDir = function(handle: Pointer; path: PAnsiChar): LongBool; cdecl;
  TCkSFtp_RemoveFile = function(handle: Pointer; filename: PAnsiChar): LongBool; cdecl;
  TCkSFtp_RenameFileOrDir = function(handle: Pointer; oldPath: PAnsiChar; newPath: PAnsiChar): LongBool; cdecl;
  TCkSFtp_ResumeDownloadFileByName = function(handle: Pointer; remoteFilePath: PAnsiChar; localFilePath: PAnsiChar): LongBool; cdecl;
  TCkSFtp_ResumeUploadFileByName = function(handle: Pointer; remoteFilePath: PAnsiChar; localFilePath: PAnsiChar): LongBool; cdecl;
  TCkSFtp_SetCreateDt = function(handle: Pointer; pathOrHandle: PAnsiChar; isHandle: LongBool; createDateTime: Pointer): LongBool; cdecl;
  TCkSFtp_SetCreateTimeStr = function(handle: Pointer; pathOrHandle: PAnsiChar; bIsHandle: LongBool; dateTimeStr: PAnsiChar): LongBool; cdecl;
  TCkSFtp_SetLastAccessDt = function(handle: Pointer; pathOrHandle: PAnsiChar; isHandle: LongBool; accessDateTime: Pointer): LongBool; cdecl;
  TCkSFtp_SetLastAccessTimeStr = function(handle: Pointer; pathOrHandle: PAnsiChar; bIsHandle: LongBool; dateTimeStr: PAnsiChar): LongBool; cdecl;
  TCkSFtp_SetLastModifiedDt = function(handle: Pointer; pathOrHandle: PAnsiChar; isHandle: LongBool; modifiedDateTime: Pointer): LongBool; cdecl;
  TCkSFtp_SetLastModifiedTimeStr = function(handle: Pointer; pathOrHandle: PAnsiChar; bIsHandle: LongBool; dateTimeStr: PAnsiChar): LongBool; cdecl;
  TCkSFtp_SetOwnerAndGroup = function(handle: Pointer; pathOrHandle: PAnsiChar; isHandle: LongBool; owner: PAnsiChar; group: PAnsiChar): LongBool; cdecl;
  TCkSFtp_SetPermissions = function(handle: Pointer; pathOrHandle: PAnsiChar; isHandle: LongBool; permissions: Integer): LongBool; cdecl;
  TCkSFtp_SyncTreeDownload = function(handle: Pointer; remoteRoot: PAnsiChar; localRoot: PAnsiChar; mode: Integer; recurse: LongBool): LongBool; cdecl;
  TCkSFtp_SyncTreeUpload = function(handle: Pointer; localBaseDir: PAnsiChar; remoteBaseDir: PAnsiChar; mode: Integer; bRecurse: LongBool): LongBool; cdecl;
  TCkSFtp_UploadFile = function(handle: Pointer; handle: PAnsiChar; fromLocalFilePath: PAnsiChar): LongBool; cdecl;
  TCkSFtp_UploadFileByName = function(handle: Pointer; remoteFilePath: PAnsiChar; localFilePath: PAnsiChar): LongBool; cdecl;
  TCkSFtp_WriteFileText = function(handle: Pointer; handle: PAnsiChar; charset: PAnsiChar; textData: PAnsiChar): LongBool; cdecl;
  TCkSFtp_WriteFileText32 = function(handle: Pointer; handle: PAnsiChar; offset32: Integer; charset: PAnsiChar; textData: PAnsiChar): LongBool; cdecl;
  TCkSFtp_WriteFileText64 = function(handle: Pointer; handle: PAnsiChar; offset64: Int64; charset: PAnsiChar; textData: PAnsiChar): LongBool; cdecl;
  TCkSFtp_WriteFileText64s = function(handle: Pointer; handle: PAnsiChar; offset64: PAnsiChar; charset: PAnsiChar; textData: PAnsiChar): LongBool; cdecl;
  TCkSFtp_UploadSb = function(handle: Pointer; sb: Pointer; remoteFilePath: PAnsiChar; charset: PAnsiChar; includeBom: LongBool): LongBool; cdecl;
  TCkSFtp_UploadBd = function(handle: Pointer; binData: Pointer; remoteFilePath: PAnsiChar): LongBool; cdecl;
  TCkSFtp_DownloadBd = function(handle: Pointer; remoteFilePath: PAnsiChar; binData: Pointer): LongBool; cdecl;
  TCkSFtp_DownloadSb = function(handle: Pointer; remoteFilePath: PAnsiChar; charset: PAnsiChar; sb: Pointer): LongBool; cdecl;
  TCkSFtp_SendIgnore = function(handle: Pointer): LongBool; cdecl;
  TCkSFtp_FileExists = function(handle: Pointer; remotePath: PAnsiChar; followLinks: LongBool): Integer; cdecl;
  TCkSFtp_AuthenticateSecPw = function(handle: Pointer; login: Pointer; password: Pointer): LongBool; cdecl;
  TCkSFtp_AuthenticateSecPwPk = function(handle: Pointer; username: Pointer; password: Pointer; privateKey: Pointer): LongBool; cdecl;
  TCkSFtp_SymLink = function(handle: Pointer; oldPath: PAnsiChar; newPath: PAnsiChar): LongBool; cdecl;
  TCkSFtp_HardLink = function(handle: Pointer; oldPath: PAnsiChar; newPath: PAnsiChar): LongBool; cdecl;
  TCkSFtp_Fsync = function(handle: Pointer; handle: PAnsiChar): LongBool; cdecl;
  TCkSFtp_ReadLink = function(handle: Pointer; path: PAnsiChar): PAnsiChar; cdecl;
  TCkSFtp_WriteFileBd = function(handle: Pointer; handle: PAnsiChar; bd: Pointer): LongBool; cdecl;
  TCkSFtp_ReadFileBd = function(handle: Pointer; handle: PAnsiChar; numBytes: Integer; bd: Pointer): LongBool; cdecl;
  TCkSFtp_StartKeyboardAuth = function(handle: Pointer; login: PAnsiChar): PAnsiChar; cdecl;
  TCkSFtp_ContinueKeyboardAuth = function(handle: Pointer; response: PAnsiChar): PAnsiChar; cdecl;
  TCkSFtp_GetHostKeyFP = function(handle: Pointer; hashAlg: PAnsiChar; includeKeyType: LongBool; includeHashName: LongBool): PAnsiChar; cdecl;
  TCkSFtp_SetAllowedAlgorithms = function(handle: Pointer; json: Pointer): LongBool; cdecl;
  TCkSFtp_GetSyncedFiles = procedure(handle: Pointer; strTab: Pointer); cdecl;
  TCkSFtp_GetLastJsonData = procedure(handle: Pointer; json: Pointer); cdecl;
  TCkSFtp_ReadDirListing = function(handle: Pointer; handle: PAnsiChar; dirObj: Pointer): LongBool; cdecl;

{ ---- C bridge function pointer variables ---- }
var
  CkSFtp_Create:  TCkSFtp_Create  = nil;
  CkSFtp_Dispose: TCkSFtp_Dispose = nil;
  CkSFtp_SetAbortCheckCallback:   TCkSFtp_SetAbortCheckCallback   = nil;
  CkSFtp_SetPercentDoneCallback:  TCkSFtp_SetPercentDoneCallback  = nil;
  CkSFtp_SetProgressInfoCallback: TCkSFtp_SetProgressInfoCallback = nil;
  CkSFtp_get_LastErrorHtml: TCkSFtp_get_LastErrorHtml = nil;
  CkSFtp_get_LastErrorText: TCkSFtp_get_LastErrorText = nil;
  CkSFtp_get_LastErrorXml: TCkSFtp_get_LastErrorXml = nil;
  CkSFtp_get_Version: TCkSFtp_get_Version = nil;
  CkSFtp_get_DebugLogFilePath: TCkSFtp_get_DebugLogFilePath = nil;
  CkSFtp_put_DebugLogFilePath: TCkSFtp_put_DebugLogFilePath = nil;
  CkSFtp_get_VerboseLogging: TCkSFtp_get_VerboseLogging = nil;
  CkSFtp_put_VerboseLogging: TCkSFtp_put_VerboseLogging = nil;
  CkSFtp_get_LastMethodSuccess: TCkSFtp_get_LastMethodSuccess = nil;
  CkSFtp_put_LastMethodSuccess: TCkSFtp_put_LastMethodSuccess = nil;
  CkSFtp_get_AuthFailReason: TCkSFtp_get_AuthFailReason = nil;
  CkSFtp_get_BandwidthThrottleDown: TCkSFtp_get_BandwidthThrottleDown = nil;
  CkSFtp_put_BandwidthThrottleDown: TCkSFtp_put_BandwidthThrottleDown = nil;
  CkSFtp_get_BandwidthThrottleUp: TCkSFtp_get_BandwidthThrottleUp = nil;
  CkSFtp_put_BandwidthThrottleUp: TCkSFtp_put_BandwidthThrottleUp = nil;
  CkSFtp_get_ClientIdentifier: TCkSFtp_get_ClientIdentifier = nil;
  CkSFtp_put_ClientIdentifier: TCkSFtp_put_ClientIdentifier = nil;
  CkSFtp_get_ClientIpAddress: TCkSFtp_get_ClientIpAddress = nil;
  CkSFtp_put_ClientIpAddress: TCkSFtp_put_ClientIpAddress = nil;
  CkSFtp_get_ConnectTimeoutMs: TCkSFtp_get_ConnectTimeoutMs = nil;
  CkSFtp_put_ConnectTimeoutMs: TCkSFtp_put_ConnectTimeoutMs = nil;
  CkSFtp_get_DisconnectCode: TCkSFtp_get_DisconnectCode = nil;
  CkSFtp_get_DisconnectReason: TCkSFtp_get_DisconnectReason = nil;
  CkSFtp_get_EnableCache: TCkSFtp_get_EnableCache = nil;
  CkSFtp_put_EnableCache: TCkSFtp_put_EnableCache = nil;
  CkSFtp_get_EnableCompression: TCkSFtp_get_EnableCompression = nil;
  CkSFtp_put_EnableCompression: TCkSFtp_put_EnableCompression = nil;
  CkSFtp_get_FilenameCharset: TCkSFtp_get_FilenameCharset = nil;
  CkSFtp_put_FilenameCharset: TCkSFtp_put_FilenameCharset = nil;
  CkSFtp_get_ForceCipher: TCkSFtp_get_ForceCipher = nil;
  CkSFtp_put_ForceCipher: TCkSFtp_put_ForceCipher = nil;
  CkSFtp_get_ForceV3: TCkSFtp_get_ForceV3 = nil;
  CkSFtp_put_ForceV3: TCkSFtp_put_ForceV3 = nil;
  CkSFtp_get_HeartbeatMs: TCkSFtp_get_HeartbeatMs = nil;
  CkSFtp_put_HeartbeatMs: TCkSFtp_put_HeartbeatMs = nil;
  CkSFtp_get_HostKeyAlg: TCkSFtp_get_HostKeyAlg = nil;
  CkSFtp_put_HostKeyAlg: TCkSFtp_put_HostKeyAlg = nil;
  CkSFtp_get_HostKeyFingerprint: TCkSFtp_get_HostKeyFingerprint = nil;
  CkSFtp_get_HttpProxyAuthMethod: TCkSFtp_get_HttpProxyAuthMethod = nil;
  CkSFtp_put_HttpProxyAuthMethod: TCkSFtp_put_HttpProxyAuthMethod = nil;
  CkSFtp_get_HttpProxyDomain: TCkSFtp_get_HttpProxyDomain = nil;
  CkSFtp_put_HttpProxyDomain: TCkSFtp_put_HttpProxyDomain = nil;
  CkSFtp_get_HttpProxyHostname: TCkSFtp_get_HttpProxyHostname = nil;
  CkSFtp_put_HttpProxyHostname: TCkSFtp_put_HttpProxyHostname = nil;
  CkSFtp_get_HttpProxyPassword: TCkSFtp_get_HttpProxyPassword = nil;
  CkSFtp_put_HttpProxyPassword: TCkSFtp_put_HttpProxyPassword = nil;
  CkSFtp_get_HttpProxyPort: TCkSFtp_get_HttpProxyPort = nil;
  CkSFtp_put_HttpProxyPort: TCkSFtp_put_HttpProxyPort = nil;
  CkSFtp_get_HttpProxyUsername: TCkSFtp_get_HttpProxyUsername = nil;
  CkSFtp_put_HttpProxyUsername: TCkSFtp_put_HttpProxyUsername = nil;
  CkSFtp_get_IdleTimeoutMs: TCkSFtp_get_IdleTimeoutMs = nil;
  CkSFtp_put_IdleTimeoutMs: TCkSFtp_put_IdleTimeoutMs = nil;
  CkSFtp_get_IncludeDotDirs: TCkSFtp_get_IncludeDotDirs = nil;
  CkSFtp_put_IncludeDotDirs: TCkSFtp_put_IncludeDotDirs = nil;
  CkSFtp_get_InitializeFailCode: TCkSFtp_get_InitializeFailCode = nil;
  CkSFtp_get_InitializeFailReason: TCkSFtp_get_InitializeFailReason = nil;
  CkSFtp_get_IsConnected: TCkSFtp_get_IsConnected = nil;
  CkSFtp_get_KeepSessionLog: TCkSFtp_get_KeepSessionLog = nil;
  CkSFtp_put_KeepSessionLog: TCkSFtp_put_KeepSessionLog = nil;
  CkSFtp_get_MaxPacketSize: TCkSFtp_get_MaxPacketSize = nil;
  CkSFtp_put_MaxPacketSize: TCkSFtp_put_MaxPacketSize = nil;
  CkSFtp_get_PasswordChangeRequested: TCkSFtp_get_PasswordChangeRequested = nil;
  CkSFtp_get_PercentDoneScale: TCkSFtp_get_PercentDoneScale = nil;
  CkSFtp_put_PercentDoneScale: TCkSFtp_put_PercentDoneScale = nil;
  CkSFtp_get_PreferIpv6: TCkSFtp_get_PreferIpv6 = nil;
  CkSFtp_put_PreferIpv6: TCkSFtp_put_PreferIpv6 = nil;
  CkSFtp_get_PreserveDate: TCkSFtp_get_PreserveDate = nil;
  CkSFtp_put_PreserveDate: TCkSFtp_put_PreserveDate = nil;
  CkSFtp_get_ProtocolVersion: TCkSFtp_get_ProtocolVersion = nil;
  CkSFtp_get_ReadDirMustMatch: TCkSFtp_get_ReadDirMustMatch = nil;
  CkSFtp_put_ReadDirMustMatch: TCkSFtp_put_ReadDirMustMatch = nil;
  CkSFtp_get_ReadDirMustNotMatch: TCkSFtp_get_ReadDirMustNotMatch = nil;
  CkSFtp_put_ReadDirMustNotMatch: TCkSFtp_put_ReadDirMustNotMatch = nil;
  CkSFtp_get_SessionLog: TCkSFtp_get_SessionLog = nil;
  CkSFtp_get_SoRcvBuf: TCkSFtp_get_SoRcvBuf = nil;
  CkSFtp_put_SoRcvBuf: TCkSFtp_put_SoRcvBuf = nil;
  CkSFtp_get_SoSndBuf: TCkSFtp_get_SoSndBuf = nil;
  CkSFtp_put_SoSndBuf: TCkSFtp_put_SoSndBuf = nil;
  CkSFtp_get_SocksHostname: TCkSFtp_get_SocksHostname = nil;
  CkSFtp_put_SocksHostname: TCkSFtp_put_SocksHostname = nil;
  CkSFtp_get_SocksPassword: TCkSFtp_get_SocksPassword = nil;
  CkSFtp_put_SocksPassword: TCkSFtp_put_SocksPassword = nil;
  CkSFtp_get_SocksPort: TCkSFtp_get_SocksPort = nil;
  CkSFtp_put_SocksPort: TCkSFtp_put_SocksPort = nil;
  CkSFtp_get_SocksUsername: TCkSFtp_get_SocksUsername = nil;
  CkSFtp_put_SocksUsername: TCkSFtp_put_SocksUsername = nil;
  CkSFtp_get_SocksVersion: TCkSFtp_get_SocksVersion = nil;
  CkSFtp_put_SocksVersion: TCkSFtp_put_SocksVersion = nil;
  CkSFtp_get_SyncMustMatch: TCkSFtp_get_SyncMustMatch = nil;
  CkSFtp_put_SyncMustMatch: TCkSFtp_put_SyncMustMatch = nil;
  CkSFtp_get_SyncMustNotMatch: TCkSFtp_get_SyncMustNotMatch = nil;
  CkSFtp_put_SyncMustNotMatch: TCkSFtp_put_SyncMustNotMatch = nil;
  CkSFtp_get_TcpNoDelay: TCkSFtp_get_TcpNoDelay = nil;
  CkSFtp_put_TcpNoDelay: TCkSFtp_put_TcpNoDelay = nil;
  CkSFtp_get_UploadChunkSize: TCkSFtp_get_UploadChunkSize = nil;
  CkSFtp_put_UploadChunkSize: TCkSFtp_put_UploadChunkSize = nil;
  CkSFtp_get_UtcMode: TCkSFtp_get_UtcMode = nil;
  CkSFtp_put_UtcMode: TCkSFtp_put_UtcMode = nil;
  CkSFtp_get_AbortCurrent: TCkSFtp_get_AbortCurrent = nil;
  CkSFtp_put_AbortCurrent: TCkSFtp_put_AbortCurrent = nil;
  CkSFtp_get_SyncDirectives: TCkSFtp_get_SyncDirectives = nil;
  CkSFtp_put_SyncDirectives: TCkSFtp_put_SyncDirectives = nil;
  CkSFtp_get_XferByteCount: TCkSFtp_get_XferByteCount = nil;
  CkSFtp_get_XferByteCount64: TCkSFtp_get_XferByteCount64 = nil;
  CkSFtp_get_ServerIdentifier: TCkSFtp_get_ServerIdentifier = nil;
  CkSFtp_get_UncommonOptions: TCkSFtp_get_UncommonOptions = nil;
  CkSFtp_put_UncommonOptions: TCkSFtp_put_UncommonOptions = nil;
  CkSFtp_get_SyncMustMatchDir: TCkSFtp_get_SyncMustMatchDir = nil;
  CkSFtp_put_SyncMustMatchDir: TCkSFtp_put_SyncMustMatchDir = nil;
  CkSFtp_get_SyncMustNotMatchDir: TCkSFtp_get_SyncMustNotMatchDir = nil;
  CkSFtp_put_SyncMustNotMatchDir: TCkSFtp_put_SyncMustNotMatchDir = nil;
  CkSFtp_get_SyncCreateAllLocalDirs: TCkSFtp_get_SyncCreateAllLocalDirs = nil;
  CkSFtp_put_SyncCreateAllLocalDirs: TCkSFtp_put_SyncCreateAllLocalDirs = nil;
  CkSFtp_get_LastStatusCode: TCkSFtp_get_LastStatusCode = nil;
  CkSFtp_get_LastStatusMessage: TCkSFtp_get_LastStatusMessage = nil;
  CkSFtp_get_UserAuthBanner: TCkSFtp_get_UserAuthBanner = nil;
  CkSFtp_put_UserAuthBanner: TCkSFtp_put_UserAuthBanner = nil;
  CkSFtp_get_EnableSecrets: TCkSFtp_get_EnableSecrets = nil;
  CkSFtp_put_EnableSecrets: TCkSFtp_put_EnableSecrets = nil;
  CkSFtp_AuthenticatePk: TCkSFtp_AuthenticatePk = nil;
  CkSFtp_AuthenticatePw: TCkSFtp_AuthenticatePw = nil;
  CkSFtp_AuthenticatePwPk: TCkSFtp_AuthenticatePwPk = nil;
  CkSFtp_ClearCache: TCkSFtp_ClearCache = nil;
  CkSFtp_ClearSessionLog: TCkSFtp_ClearSessionLog = nil;
  CkSFtp_CloseHandle: TCkSFtp_CloseHandle = nil;
  CkSFtp_Connect: TCkSFtp_Connect = nil;
  CkSFtp_ConnectThroughSsh: TCkSFtp_ConnectThroughSsh = nil;
  CkSFtp_CopyFileAttr: TCkSFtp_CopyFileAttr = nil;
  CkSFtp_CreateDir: TCkSFtp_CreateDir = nil;
  CkSFtp_Disconnect: TCkSFtp_Disconnect = nil;
  CkSFtp_DownloadFile: TCkSFtp_DownloadFile = nil;
  CkSFtp_DownloadFileByName: TCkSFtp_DownloadFileByName = nil;
  CkSFtp_Eof: TCkSFtp_Eof = nil;
  CkSFtp_GetFileCreateTimeStr: TCkSFtp_GetFileCreateTimeStr = nil;
  CkSFtp_GetFileGroup: TCkSFtp_GetFileGroup = nil;
  CkSFtp_GetFileLastAccessStr: TCkSFtp_GetFileLastAccessStr = nil;
  CkSFtp_GetFileLastModifiedStr: TCkSFtp_GetFileLastModifiedStr = nil;
  CkSFtp_GetFileOwner: TCkSFtp_GetFileOwner = nil;
  CkSFtp_GetFilePermissions: TCkSFtp_GetFilePermissions = nil;
  CkSFtp_GetFileSize32: TCkSFtp_GetFileSize32 = nil;
  CkSFtp_GetFileSize64: TCkSFtp_GetFileSize64 = nil;
  CkSFtp_GetFileSizeStr: TCkSFtp_GetFileSizeStr = nil;
  CkSFtp_InitializeSftp: TCkSFtp_InitializeSftp = nil;
  CkSFtp_LastReadFailed: TCkSFtp_LastReadFailed = nil;
  CkSFtp_LastReadNumBytes: TCkSFtp_LastReadNumBytes = nil;
  CkSFtp_OpenDir: TCkSFtp_OpenDir = nil;
  CkSFtp_OpenFile: TCkSFtp_OpenFile = nil;
  CkSFtp_ReadFileText: TCkSFtp_ReadFileText = nil;
  CkSFtp_ReadFileText32: TCkSFtp_ReadFileText32 = nil;
  CkSFtp_ReadFileText64: TCkSFtp_ReadFileText64 = nil;
  CkSFtp_ReadFileText64s: TCkSFtp_ReadFileText64s = nil;
  CkSFtp_RealPath: TCkSFtp_RealPath = nil;
  CkSFtp_RemoveDir: TCkSFtp_RemoveDir = nil;
  CkSFtp_RemoveFile: TCkSFtp_RemoveFile = nil;
  CkSFtp_RenameFileOrDir: TCkSFtp_RenameFileOrDir = nil;
  CkSFtp_ResumeDownloadFileByName: TCkSFtp_ResumeDownloadFileByName = nil;
  CkSFtp_ResumeUploadFileByName: TCkSFtp_ResumeUploadFileByName = nil;
  CkSFtp_SetCreateDt: TCkSFtp_SetCreateDt = nil;
  CkSFtp_SetCreateTimeStr: TCkSFtp_SetCreateTimeStr = nil;
  CkSFtp_SetLastAccessDt: TCkSFtp_SetLastAccessDt = nil;
  CkSFtp_SetLastAccessTimeStr: TCkSFtp_SetLastAccessTimeStr = nil;
  CkSFtp_SetLastModifiedDt: TCkSFtp_SetLastModifiedDt = nil;
  CkSFtp_SetLastModifiedTimeStr: TCkSFtp_SetLastModifiedTimeStr = nil;
  CkSFtp_SetOwnerAndGroup: TCkSFtp_SetOwnerAndGroup = nil;
  CkSFtp_SetPermissions: TCkSFtp_SetPermissions = nil;
  CkSFtp_SyncTreeDownload: TCkSFtp_SyncTreeDownload = nil;
  CkSFtp_SyncTreeUpload: TCkSFtp_SyncTreeUpload = nil;
  CkSFtp_UploadFile: TCkSFtp_UploadFile = nil;
  CkSFtp_UploadFileByName: TCkSFtp_UploadFileByName = nil;
  CkSFtp_WriteFileText: TCkSFtp_WriteFileText = nil;
  CkSFtp_WriteFileText32: TCkSFtp_WriteFileText32 = nil;
  CkSFtp_WriteFileText64: TCkSFtp_WriteFileText64 = nil;
  CkSFtp_WriteFileText64s: TCkSFtp_WriteFileText64s = nil;
  CkSFtp_UploadSb: TCkSFtp_UploadSb = nil;
  CkSFtp_UploadBd: TCkSFtp_UploadBd = nil;
  CkSFtp_DownloadBd: TCkSFtp_DownloadBd = nil;
  CkSFtp_DownloadSb: TCkSFtp_DownloadSb = nil;
  CkSFtp_SendIgnore: TCkSFtp_SendIgnore = nil;
  CkSFtp_FileExists: TCkSFtp_FileExists = nil;
  CkSFtp_AuthenticateSecPw: TCkSFtp_AuthenticateSecPw = nil;
  CkSFtp_AuthenticateSecPwPk: TCkSFtp_AuthenticateSecPwPk = nil;
  CkSFtp_SymLink: TCkSFtp_SymLink = nil;
  CkSFtp_HardLink: TCkSFtp_HardLink = nil;
  CkSFtp_Fsync: TCkSFtp_Fsync = nil;
  CkSFtp_ReadLink: TCkSFtp_ReadLink = nil;
  CkSFtp_WriteFileBd: TCkSFtp_WriteFileBd = nil;
  CkSFtp_ReadFileBd: TCkSFtp_ReadFileBd = nil;
  CkSFtp_StartKeyboardAuth: TCkSFtp_StartKeyboardAuth = nil;
  CkSFtp_ContinueKeyboardAuth: TCkSFtp_ContinueKeyboardAuth = nil;
  CkSFtp_GetHostKeyFP: TCkSFtp_GetHostKeyFP = nil;
  CkSFtp_SetAllowedAlgorithms: TCkSFtp_SetAllowedAlgorithms = nil;
  CkSFtp_GetSyncedFiles: TCkSFtp_GetSyncedFiles = nil;
  CkSFtp_GetLastJsonData: TCkSFtp_GetLastJsonData = nil;
  CkSFtp_ReadDirListing: TCkSFtp_ReadDirListing = nil;

constructor TSFtp.Create;
begin
  inherited Create;
  FHandle := CkSFtp_Create();
end;

destructor TSFtp.Destroy;
begin
  if FHandle <> nil then
    CkSFtp_Dispose(FHandle);
  FHandle := nil;
  inherited;
end;

{ ---- Event callback thunks ---- }
{ Standalone cdecl functions registered with the C bridge.  The bridge
  passes back the userData pointer, which carries the Pascal object
  instance.  A non-zero return value aborts the running method. }

function TSFtp_AbortCheckThunk(userData: Pointer): Integer; cdecl;
var
  obj: TSFtp;
begin
  Result := 0;
  obj := TSFtp(userData);
  if Assigned(obj) and Assigned(obj.FOnAbortCheck) then
    if obj.FOnAbortCheck(obj) then Result := 1;
end;

function TSFtp_PercentDoneThunk(pctDone: Integer; userData: Pointer): Integer; cdecl;
var
  obj: TSFtp;
begin
  Result := 0;
  obj := TSFtp(userData);
  if Assigned(obj) and Assigned(obj.FOnPercentDone) then
    if obj.FOnPercentDone(obj, pctDone) then Result := 1;
end;

procedure TSFtp_ProgressInfoThunk(name: PAnsiChar; value: PAnsiChar; userData: Pointer); cdecl;
var
  obj: TSFtp;
begin
  obj := TSFtp(userData);
  if Assigned(obj) and Assigned(obj.FOnProgressInfo) then
    obj.FOnProgressInfo(obj, CkToStr(name), CkToStr(value));
end;

procedure TSFtp.SetOnAbortCheck(AValue: TChilkatAbortCheckEvent);
begin
  FOnAbortCheck := AValue;
  if Assigned(AValue) then
    CkSFtp_SetAbortCheckCallback(FHandle, @TSFtp_AbortCheckThunk, Self)
  else
    CkSFtp_SetAbortCheckCallback(FHandle, nil, nil);
end;

procedure TSFtp.SetOnPercentDone(AValue: TChilkatPercentDoneEvent);
begin
  FOnPercentDone := AValue;
  if Assigned(AValue) then
    CkSFtp_SetPercentDoneCallback(FHandle, @TSFtp_PercentDoneThunk, Self)
  else
    CkSFtp_SetPercentDoneCallback(FHandle, nil, nil);
end;

procedure TSFtp.SetOnProgressInfo(AValue: TChilkatProgressInfoEvent);
begin
  FOnProgressInfo := AValue;
  if Assigned(AValue) then
    CkSFtp_SetProgressInfoCallback(FHandle, @TSFtp_ProgressInfoThunk, Self)
  else
    CkSFtp_SetProgressInfoCallback(FHandle, nil, nil);
end;

function TSFtp.GetLastErrorHtml: string;
begin
  Result := CkToStr(CkSFtp_get_LastErrorHtml(FHandle));
end;

function TSFtp.GetLastErrorText: string;
begin
  Result := CkToStr(CkSFtp_get_LastErrorText(FHandle));
end;

function TSFtp.GetLastErrorXml: string;
begin
  Result := CkToStr(CkSFtp_get_LastErrorXml(FHandle));
end;

function TSFtp.GetVersion: string;
begin
  Result := CkToStr(CkSFtp_get_Version(FHandle));
end;

function TSFtp.GetDebugLogFilePath: string;
begin
  Result := CkToStr(CkSFtp_get_DebugLogFilePath(FHandle));
end;

procedure TSFtp.SetDebugLogFilePath(AValue: string);
begin
  CkSFtp_put_DebugLogFilePath(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetVerboseLogging: Boolean;
begin
  Result := Boolean(CkSFtp_get_VerboseLogging(FHandle));
end;

procedure TSFtp.SetVerboseLogging(AValue: Boolean);
begin
  CkSFtp_put_VerboseLogging(FHandle, LongBool(AValue));
end;

function TSFtp.GetLastMethodSuccess: Boolean;
begin
  Result := Boolean(CkSFtp_get_LastMethodSuccess(FHandle));
end;

procedure TSFtp.SetLastMethodSuccess(AValue: Boolean);
begin
  CkSFtp_put_LastMethodSuccess(FHandle, LongBool(AValue));
end;

function TSFtp.GetAuthFailReason: Integer;
begin
  Result := CkSFtp_get_AuthFailReason(FHandle);
end;

function TSFtp.GetBandwidthThrottleDown: Integer;
begin
  Result := CkSFtp_get_BandwidthThrottleDown(FHandle);
end;

procedure TSFtp.SetBandwidthThrottleDown(AValue: Integer);
begin
  CkSFtp_put_BandwidthThrottleDown(FHandle, AValue);
end;

function TSFtp.GetBandwidthThrottleUp: Integer;
begin
  Result := CkSFtp_get_BandwidthThrottleUp(FHandle);
end;

procedure TSFtp.SetBandwidthThrottleUp(AValue: Integer);
begin
  CkSFtp_put_BandwidthThrottleUp(FHandle, AValue);
end;

function TSFtp.GetClientIdentifier: string;
begin
  Result := CkToStr(CkSFtp_get_ClientIdentifier(FHandle));
end;

procedure TSFtp.SetClientIdentifier(AValue: string);
begin
  CkSFtp_put_ClientIdentifier(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetClientIpAddress: string;
begin
  Result := CkToStr(CkSFtp_get_ClientIpAddress(FHandle));
end;

procedure TSFtp.SetClientIpAddress(AValue: string);
begin
  CkSFtp_put_ClientIpAddress(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetConnectTimeoutMs: Integer;
begin
  Result := CkSFtp_get_ConnectTimeoutMs(FHandle);
end;

procedure TSFtp.SetConnectTimeoutMs(AValue: Integer);
begin
  CkSFtp_put_ConnectTimeoutMs(FHandle, AValue);
end;

function TSFtp.GetDisconnectCode: Integer;
begin
  Result := CkSFtp_get_DisconnectCode(FHandle);
end;

function TSFtp.GetDisconnectReason: string;
begin
  Result := CkToStr(CkSFtp_get_DisconnectReason(FHandle));
end;

function TSFtp.GetEnableCache: Boolean;
begin
  Result := Boolean(CkSFtp_get_EnableCache(FHandle));
end;

procedure TSFtp.SetEnableCache(AValue: Boolean);
begin
  CkSFtp_put_EnableCache(FHandle, LongBool(AValue));
end;

function TSFtp.GetEnableCompression: Boolean;
begin
  Result := Boolean(CkSFtp_get_EnableCompression(FHandle));
end;

procedure TSFtp.SetEnableCompression(AValue: Boolean);
begin
  CkSFtp_put_EnableCompression(FHandle, LongBool(AValue));
end;

function TSFtp.GetFilenameCharset: string;
begin
  Result := CkToStr(CkSFtp_get_FilenameCharset(FHandle));
end;

procedure TSFtp.SetFilenameCharset(AValue: string);
begin
  CkSFtp_put_FilenameCharset(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetForceCipher: string;
begin
  Result := CkToStr(CkSFtp_get_ForceCipher(FHandle));
end;

procedure TSFtp.SetForceCipher(AValue: string);
begin
  CkSFtp_put_ForceCipher(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetForceV3: Boolean;
begin
  Result := Boolean(CkSFtp_get_ForceV3(FHandle));
end;

procedure TSFtp.SetForceV3(AValue: Boolean);
begin
  CkSFtp_put_ForceV3(FHandle, LongBool(AValue));
end;

function TSFtp.GetHeartbeatMs: Integer;
begin
  Result := CkSFtp_get_HeartbeatMs(FHandle);
end;

procedure TSFtp.SetHeartbeatMs(AValue: Integer);
begin
  CkSFtp_put_HeartbeatMs(FHandle, AValue);
end;

function TSFtp.GetHostKeyAlg: string;
begin
  Result := CkToStr(CkSFtp_get_HostKeyAlg(FHandle));
end;

procedure TSFtp.SetHostKeyAlg(AValue: string);
begin
  CkSFtp_put_HostKeyAlg(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetHostKeyFingerprint: string;
begin
  Result := CkToStr(CkSFtp_get_HostKeyFingerprint(FHandle));
end;

function TSFtp.GetHttpProxyAuthMethod: string;
begin
  Result := CkToStr(CkSFtp_get_HttpProxyAuthMethod(FHandle));
end;

procedure TSFtp.SetHttpProxyAuthMethod(AValue: string);
begin
  CkSFtp_put_HttpProxyAuthMethod(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetHttpProxyDomain: string;
begin
  Result := CkToStr(CkSFtp_get_HttpProxyDomain(FHandle));
end;

procedure TSFtp.SetHttpProxyDomain(AValue: string);
begin
  CkSFtp_put_HttpProxyDomain(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetHttpProxyHostname: string;
begin
  Result := CkToStr(CkSFtp_get_HttpProxyHostname(FHandle));
end;

procedure TSFtp.SetHttpProxyHostname(AValue: string);
begin
  CkSFtp_put_HttpProxyHostname(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetHttpProxyPassword: string;
begin
  Result := CkToStr(CkSFtp_get_HttpProxyPassword(FHandle));
end;

procedure TSFtp.SetHttpProxyPassword(AValue: string);
begin
  CkSFtp_put_HttpProxyPassword(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetHttpProxyPort: Integer;
begin
  Result := CkSFtp_get_HttpProxyPort(FHandle);
end;

procedure TSFtp.SetHttpProxyPort(AValue: Integer);
begin
  CkSFtp_put_HttpProxyPort(FHandle, AValue);
end;

function TSFtp.GetHttpProxyUsername: string;
begin
  Result := CkToStr(CkSFtp_get_HttpProxyUsername(FHandle));
end;

procedure TSFtp.SetHttpProxyUsername(AValue: string);
begin
  CkSFtp_put_HttpProxyUsername(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetIdleTimeoutMs: Integer;
begin
  Result := CkSFtp_get_IdleTimeoutMs(FHandle);
end;

procedure TSFtp.SetIdleTimeoutMs(AValue: Integer);
begin
  CkSFtp_put_IdleTimeoutMs(FHandle, AValue);
end;

function TSFtp.GetIncludeDotDirs: Boolean;
begin
  Result := Boolean(CkSFtp_get_IncludeDotDirs(FHandle));
end;

procedure TSFtp.SetIncludeDotDirs(AValue: Boolean);
begin
  CkSFtp_put_IncludeDotDirs(FHandle, LongBool(AValue));
end;

function TSFtp.GetInitializeFailCode: Integer;
begin
  Result := CkSFtp_get_InitializeFailCode(FHandle);
end;

function TSFtp.GetInitializeFailReason: string;
begin
  Result := CkToStr(CkSFtp_get_InitializeFailReason(FHandle));
end;

function TSFtp.GetIsConnected: Boolean;
begin
  Result := Boolean(CkSFtp_get_IsConnected(FHandle));
end;

function TSFtp.GetKeepSessionLog: Boolean;
begin
  Result := Boolean(CkSFtp_get_KeepSessionLog(FHandle));
end;

procedure TSFtp.SetKeepSessionLog(AValue: Boolean);
begin
  CkSFtp_put_KeepSessionLog(FHandle, LongBool(AValue));
end;

function TSFtp.GetMaxPacketSize: Integer;
begin
  Result := CkSFtp_get_MaxPacketSize(FHandle);
end;

procedure TSFtp.SetMaxPacketSize(AValue: Integer);
begin
  CkSFtp_put_MaxPacketSize(FHandle, AValue);
end;

function TSFtp.GetPasswordChangeRequested: Boolean;
begin
  Result := Boolean(CkSFtp_get_PasswordChangeRequested(FHandle));
end;

function TSFtp.GetPercentDoneScale: Integer;
begin
  Result := CkSFtp_get_PercentDoneScale(FHandle);
end;

procedure TSFtp.SetPercentDoneScale(AValue: Integer);
begin
  CkSFtp_put_PercentDoneScale(FHandle, AValue);
end;

function TSFtp.GetPreferIpv6: Boolean;
begin
  Result := Boolean(CkSFtp_get_PreferIpv6(FHandle));
end;

procedure TSFtp.SetPreferIpv6(AValue: Boolean);
begin
  CkSFtp_put_PreferIpv6(FHandle, LongBool(AValue));
end;

function TSFtp.GetPreserveDate: Boolean;
begin
  Result := Boolean(CkSFtp_get_PreserveDate(FHandle));
end;

procedure TSFtp.SetPreserveDate(AValue: Boolean);
begin
  CkSFtp_put_PreserveDate(FHandle, LongBool(AValue));
end;

function TSFtp.GetProtocolVersion: Integer;
begin
  Result := CkSFtp_get_ProtocolVersion(FHandle);
end;

function TSFtp.GetReadDirMustMatch: string;
begin
  Result := CkToStr(CkSFtp_get_ReadDirMustMatch(FHandle));
end;

procedure TSFtp.SetReadDirMustMatch(AValue: string);
begin
  CkSFtp_put_ReadDirMustMatch(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetReadDirMustNotMatch: string;
begin
  Result := CkToStr(CkSFtp_get_ReadDirMustNotMatch(FHandle));
end;

procedure TSFtp.SetReadDirMustNotMatch(AValue: string);
begin
  CkSFtp_put_ReadDirMustNotMatch(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetSessionLog: string;
begin
  Result := CkToStr(CkSFtp_get_SessionLog(FHandle));
end;

function TSFtp.GetSoRcvBuf: Integer;
begin
  Result := CkSFtp_get_SoRcvBuf(FHandle);
end;

procedure TSFtp.SetSoRcvBuf(AValue: Integer);
begin
  CkSFtp_put_SoRcvBuf(FHandle, AValue);
end;

function TSFtp.GetSoSndBuf: Integer;
begin
  Result := CkSFtp_get_SoSndBuf(FHandle);
end;

procedure TSFtp.SetSoSndBuf(AValue: Integer);
begin
  CkSFtp_put_SoSndBuf(FHandle, AValue);
end;

function TSFtp.GetSocksHostname: string;
begin
  Result := CkToStr(CkSFtp_get_SocksHostname(FHandle));
end;

procedure TSFtp.SetSocksHostname(AValue: string);
begin
  CkSFtp_put_SocksHostname(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetSocksPassword: string;
begin
  Result := CkToStr(CkSFtp_get_SocksPassword(FHandle));
end;

procedure TSFtp.SetSocksPassword(AValue: string);
begin
  CkSFtp_put_SocksPassword(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetSocksPort: Integer;
begin
  Result := CkSFtp_get_SocksPort(FHandle);
end;

procedure TSFtp.SetSocksPort(AValue: Integer);
begin
  CkSFtp_put_SocksPort(FHandle, AValue);
end;

function TSFtp.GetSocksUsername: string;
begin
  Result := CkToStr(CkSFtp_get_SocksUsername(FHandle));
end;

procedure TSFtp.SetSocksUsername(AValue: string);
begin
  CkSFtp_put_SocksUsername(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetSocksVersion: Integer;
begin
  Result := CkSFtp_get_SocksVersion(FHandle);
end;

procedure TSFtp.SetSocksVersion(AValue: Integer);
begin
  CkSFtp_put_SocksVersion(FHandle, AValue);
end;

function TSFtp.GetSyncMustMatch: string;
begin
  Result := CkToStr(CkSFtp_get_SyncMustMatch(FHandle));
end;

procedure TSFtp.SetSyncMustMatch(AValue: string);
begin
  CkSFtp_put_SyncMustMatch(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetSyncMustNotMatch: string;
begin
  Result := CkToStr(CkSFtp_get_SyncMustNotMatch(FHandle));
end;

procedure TSFtp.SetSyncMustNotMatch(AValue: string);
begin
  CkSFtp_put_SyncMustNotMatch(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetTcpNoDelay: Boolean;
begin
  Result := Boolean(CkSFtp_get_TcpNoDelay(FHandle));
end;

procedure TSFtp.SetTcpNoDelay(AValue: Boolean);
begin
  CkSFtp_put_TcpNoDelay(FHandle, LongBool(AValue));
end;

function TSFtp.GetUploadChunkSize: Integer;
begin
  Result := CkSFtp_get_UploadChunkSize(FHandle);
end;

procedure TSFtp.SetUploadChunkSize(AValue: Integer);
begin
  CkSFtp_put_UploadChunkSize(FHandle, AValue);
end;

function TSFtp.GetUtcMode: Boolean;
begin
  Result := Boolean(CkSFtp_get_UtcMode(FHandle));
end;

procedure TSFtp.SetUtcMode(AValue: Boolean);
begin
  CkSFtp_put_UtcMode(FHandle, LongBool(AValue));
end;

function TSFtp.GetAbortCurrent: Boolean;
begin
  Result := Boolean(CkSFtp_get_AbortCurrent(FHandle));
end;

procedure TSFtp.SetAbortCurrent(AValue: Boolean);
begin
  CkSFtp_put_AbortCurrent(FHandle, LongBool(AValue));
end;

function TSFtp.GetSyncDirectives: string;
begin
  Result := CkToStr(CkSFtp_get_SyncDirectives(FHandle));
end;

procedure TSFtp.SetSyncDirectives(AValue: string);
begin
  CkSFtp_put_SyncDirectives(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetXferByteCount: LongWord;
begin
  Result := CkSFtp_get_XferByteCount(FHandle);
end;

function TSFtp.GetXferByteCount64: Int64;
begin
  Result := CkSFtp_get_XferByteCount64(FHandle);
end;

function TSFtp.GetServerIdentifier: string;
begin
  Result := CkToStr(CkSFtp_get_ServerIdentifier(FHandle));
end;

function TSFtp.GetUncommonOptions: string;
begin
  Result := CkToStr(CkSFtp_get_UncommonOptions(FHandle));
end;

procedure TSFtp.SetUncommonOptions(AValue: string);
begin
  CkSFtp_put_UncommonOptions(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetSyncMustMatchDir: string;
begin
  Result := CkToStr(CkSFtp_get_SyncMustMatchDir(FHandle));
end;

procedure TSFtp.SetSyncMustMatchDir(AValue: string);
begin
  CkSFtp_put_SyncMustMatchDir(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetSyncMustNotMatchDir: string;
begin
  Result := CkToStr(CkSFtp_get_SyncMustNotMatchDir(FHandle));
end;

procedure TSFtp.SetSyncMustNotMatchDir(AValue: string);
begin
  CkSFtp_put_SyncMustNotMatchDir(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetSyncCreateAllLocalDirs: Boolean;
begin
  Result := Boolean(CkSFtp_get_SyncCreateAllLocalDirs(FHandle));
end;

procedure TSFtp.SetSyncCreateAllLocalDirs(AValue: Boolean);
begin
  CkSFtp_put_SyncCreateAllLocalDirs(FHandle, LongBool(AValue));
end;

function TSFtp.GetLastStatusCode: Integer;
begin
  Result := CkSFtp_get_LastStatusCode(FHandle);
end;

function TSFtp.GetLastStatusMessage: string;
begin
  Result := CkToStr(CkSFtp_get_LastStatusMessage(FHandle));
end;

function TSFtp.GetUserAuthBanner: string;
begin
  Result := CkToStr(CkSFtp_get_UserAuthBanner(FHandle));
end;

procedure TSFtp.SetUserAuthBanner(AValue: string);
begin
  CkSFtp_put_UserAuthBanner(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtp.GetEnableSecrets: Boolean;
begin
  Result := Boolean(CkSFtp_get_EnableSecrets(FHandle));
end;

procedure TSFtp.SetEnableSecrets(AValue: Boolean);
begin
  CkSFtp_put_EnableSecrets(FHandle, LongBool(AValue));
end;

function TSFtp.AuthenticatePk(const username: string; privateKey: TChilkatBase): Boolean;
begin
  Result := Boolean(CkSFtp_AuthenticatePk(FHandle, PAnsiChar(StrToCk(username)), privateKey.Handle));
end;

function TSFtp.AuthenticatePw(const login: string; const password: string): Boolean;
begin
  Result := Boolean(CkSFtp_AuthenticatePw(FHandle, PAnsiChar(StrToCk(login)), PAnsiChar(StrToCk(password))));
end;

function TSFtp.AuthenticatePwPk(const username: string; const password: string; privateKey: TChilkatBase): Boolean;
begin
  Result := Boolean(CkSFtp_AuthenticatePwPk(FHandle, PAnsiChar(StrToCk(username)), PAnsiChar(StrToCk(password)), privateKey.Handle));
end;

procedure TSFtp.ClearCache;
begin
  CkSFtp_ClearCache(FHandle);
end;

procedure TSFtp.ClearSessionLog;
begin
  CkSFtp_ClearSessionLog(FHandle);
end;

function TSFtp.CloseHandle(const handle: string): Boolean;
begin
  Result := Boolean(CkSFtp_CloseHandle(FHandle, PAnsiChar(StrToCk(handle))));
end;

function TSFtp.Connect(const domainName: string; port: Integer): Boolean;
begin
  Result := Boolean(CkSFtp_Connect(FHandle, PAnsiChar(StrToCk(domainName)), port));
end;

function TSFtp.ConnectThroughSsh(sshConn: TChilkatBase; const hostname: string; port: Integer): Boolean;
begin
  Result := Boolean(CkSFtp_ConnectThroughSsh(FHandle, sshConn.Handle, PAnsiChar(StrToCk(hostname)), port));
end;

function TSFtp.CopyFileAttr(const localFilename: string; const remoteFilename: string; isHandle: Boolean): Boolean;
begin
  Result := Boolean(CkSFtp_CopyFileAttr(FHandle, PAnsiChar(StrToCk(localFilename)), PAnsiChar(StrToCk(remoteFilename)), LongBool(isHandle)));
end;

function TSFtp.CreateDir(const path: string): Boolean;
begin
  Result := Boolean(CkSFtp_CreateDir(FHandle, PAnsiChar(StrToCk(path))));
end;

procedure TSFtp.Disconnect;
begin
  CkSFtp_Disconnect(FHandle);
end;

function TSFtp.DownloadFile(const handle: string; const toFilename: string): Boolean;
begin
  Result := Boolean(CkSFtp_DownloadFile(FHandle, PAnsiChar(StrToCk(handle)), PAnsiChar(StrToCk(toFilename))));
end;

function TSFtp.DownloadFileByName(const remoteFilePath: string; const localFilePath: string): Boolean;
begin
  Result := Boolean(CkSFtp_DownloadFileByName(FHandle, PAnsiChar(StrToCk(remoteFilePath)), PAnsiChar(StrToCk(localFilePath))));
end;

function TSFtp.Eof(const handle: string): Boolean;
begin
  Result := Boolean(CkSFtp_Eof(FHandle, PAnsiChar(StrToCk(handle))));
end;

function TSFtp.GetFileCreateTimeStr(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): string;
begin
  Result := CkToStr(CkSFtp_GetFileCreateTimeStr(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(bFollowLinks), LongBool(bIsHandle)));
end;

function TSFtp.GetFileGroup(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): string;
begin
  Result := CkToStr(CkSFtp_GetFileGroup(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(bFollowLinks), LongBool(bIsHandle)));
end;

function TSFtp.GetFileLastAccessStr(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): string;
begin
  Result := CkToStr(CkSFtp_GetFileLastAccessStr(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(bFollowLinks), LongBool(bIsHandle)));
end;

function TSFtp.GetFileLastModifiedStr(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): string;
begin
  Result := CkToStr(CkSFtp_GetFileLastModifiedStr(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(bFollowLinks), LongBool(bIsHandle)));
end;

function TSFtp.GetFileOwner(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): string;
begin
  Result := CkToStr(CkSFtp_GetFileOwner(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(bFollowLinks), LongBool(bIsHandle)));
end;

function TSFtp.GetFilePermissions(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): Integer;
begin
  Result := CkSFtp_GetFilePermissions(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(bFollowLinks), LongBool(bIsHandle));
end;

function TSFtp.GetFileSize32(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): Integer;
begin
  Result := CkSFtp_GetFileSize32(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(bFollowLinks), LongBool(bIsHandle));
end;

function TSFtp.GetFileSize64(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): Int64;
begin
  Result := CkSFtp_GetFileSize64(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(bFollowLinks), LongBool(bIsHandle));
end;

function TSFtp.GetFileSizeStr(const pathOrHandle: string; bFollowLinks: Boolean; bIsHandle: Boolean): string;
begin
  Result := CkToStr(CkSFtp_GetFileSizeStr(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(bFollowLinks), LongBool(bIsHandle)));
end;

function TSFtp.InitializeSftp: Boolean;
begin
  Result := Boolean(CkSFtp_InitializeSftp(FHandle));
end;

function TSFtp.LastReadFailed(const handle: string): Boolean;
begin
  Result := Boolean(CkSFtp_LastReadFailed(FHandle, PAnsiChar(StrToCk(handle))));
end;

function TSFtp.LastReadNumBytes(const handle: string): Integer;
begin
  Result := CkSFtp_LastReadNumBytes(FHandle, PAnsiChar(StrToCk(handle)));
end;

function TSFtp.OpenDir(const path: string): string;
begin
  Result := CkToStr(CkSFtp_OpenDir(FHandle, PAnsiChar(StrToCk(path))));
end;

function TSFtp.OpenFile(const remotePath: string; const access: string; const createDisposition: string): string;
begin
  Result := CkToStr(CkSFtp_OpenFile(FHandle, PAnsiChar(StrToCk(remotePath)), PAnsiChar(StrToCk(access)), PAnsiChar(StrToCk(createDisposition))));
end;

function TSFtp.ReadFileText(const handle: string; numBytes: Integer; const charset: string): string;
begin
  Result := CkToStr(CkSFtp_ReadFileText(FHandle, PAnsiChar(StrToCk(handle)), numBytes, PAnsiChar(StrToCk(charset))));
end;

function TSFtp.ReadFileText32(const handle: string; offset: Integer; numBytes: Integer; const charset: string): string;
begin
  Result := CkToStr(CkSFtp_ReadFileText32(FHandle, PAnsiChar(StrToCk(handle)), offset, numBytes, PAnsiChar(StrToCk(charset))));
end;

function TSFtp.ReadFileText64(const handle: string; offset: Int64; numBytes: Integer; const charset: string): string;
begin
  Result := CkToStr(CkSFtp_ReadFileText64(FHandle, PAnsiChar(StrToCk(handle)), offset, numBytes, PAnsiChar(StrToCk(charset))));
end;

function TSFtp.ReadFileText64s(const handle: string; const offset: string; numBytes: Integer; const charset: string): string;
begin
  Result := CkToStr(CkSFtp_ReadFileText64s(FHandle, PAnsiChar(StrToCk(handle)), PAnsiChar(StrToCk(offset)), numBytes, PAnsiChar(StrToCk(charset))));
end;

function TSFtp.RealPath(const originalPath: string; const composePath: string): string;
begin
  Result := CkToStr(CkSFtp_RealPath(FHandle, PAnsiChar(StrToCk(originalPath)), PAnsiChar(StrToCk(composePath))));
end;

function TSFtp.RemoveDir(const path: string): Boolean;
begin
  Result := Boolean(CkSFtp_RemoveDir(FHandle, PAnsiChar(StrToCk(path))));
end;

function TSFtp.RemoveFile(const filename: string): Boolean;
begin
  Result := Boolean(CkSFtp_RemoveFile(FHandle, PAnsiChar(StrToCk(filename))));
end;

function TSFtp.RenameFileOrDir(const oldPath: string; const newPath: string): Boolean;
begin
  Result := Boolean(CkSFtp_RenameFileOrDir(FHandle, PAnsiChar(StrToCk(oldPath)), PAnsiChar(StrToCk(newPath))));
end;

function TSFtp.ResumeDownloadFileByName(const remoteFilePath: string; const localFilePath: string): Boolean;
begin
  Result := Boolean(CkSFtp_ResumeDownloadFileByName(FHandle, PAnsiChar(StrToCk(remoteFilePath)), PAnsiChar(StrToCk(localFilePath))));
end;

function TSFtp.ResumeUploadFileByName(const remoteFilePath: string; const localFilePath: string): Boolean;
begin
  Result := Boolean(CkSFtp_ResumeUploadFileByName(FHandle, PAnsiChar(StrToCk(remoteFilePath)), PAnsiChar(StrToCk(localFilePath))));
end;

function TSFtp.SetCreateDt(const pathOrHandle: string; isHandle: Boolean; createDateTime: TChilkatBase): Boolean;
begin
  Result := Boolean(CkSFtp_SetCreateDt(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(isHandle), createDateTime.Handle));
end;

function TSFtp.SetCreateTimeStr(const pathOrHandle: string; bIsHandle: Boolean; const dateTimeStr: string): Boolean;
begin
  Result := Boolean(CkSFtp_SetCreateTimeStr(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(bIsHandle), PAnsiChar(StrToCk(dateTimeStr))));
end;

function TSFtp.SetLastAccessDt(const pathOrHandle: string; isHandle: Boolean; accessDateTime: TChilkatBase): Boolean;
begin
  Result := Boolean(CkSFtp_SetLastAccessDt(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(isHandle), accessDateTime.Handle));
end;

function TSFtp.SetLastAccessTimeStr(const pathOrHandle: string; bIsHandle: Boolean; const dateTimeStr: string): Boolean;
begin
  Result := Boolean(CkSFtp_SetLastAccessTimeStr(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(bIsHandle), PAnsiChar(StrToCk(dateTimeStr))));
end;

function TSFtp.SetLastModifiedDt(const pathOrHandle: string; isHandle: Boolean; modifiedDateTime: TChilkatBase): Boolean;
begin
  Result := Boolean(CkSFtp_SetLastModifiedDt(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(isHandle), modifiedDateTime.Handle));
end;

function TSFtp.SetLastModifiedTimeStr(const pathOrHandle: string; bIsHandle: Boolean; const dateTimeStr: string): Boolean;
begin
  Result := Boolean(CkSFtp_SetLastModifiedTimeStr(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(bIsHandle), PAnsiChar(StrToCk(dateTimeStr))));
end;

function TSFtp.SetOwnerAndGroup(const pathOrHandle: string; isHandle: Boolean; const owner: string; const group: string): Boolean;
begin
  Result := Boolean(CkSFtp_SetOwnerAndGroup(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(isHandle), PAnsiChar(StrToCk(owner)), PAnsiChar(StrToCk(group))));
end;

function TSFtp.SetPermissions(const pathOrHandle: string; isHandle: Boolean; permissions: Integer): Boolean;
begin
  Result := Boolean(CkSFtp_SetPermissions(FHandle, PAnsiChar(StrToCk(pathOrHandle)), LongBool(isHandle), permissions));
end;

function TSFtp.SyncTreeDownload(const remoteRoot: string; const localRoot: string; mode: Integer; recurse: Boolean): Boolean;
begin
  Result := Boolean(CkSFtp_SyncTreeDownload(FHandle, PAnsiChar(StrToCk(remoteRoot)), PAnsiChar(StrToCk(localRoot)), mode, LongBool(recurse)));
end;

function TSFtp.SyncTreeUpload(const localBaseDir: string; const remoteBaseDir: string; mode: Integer; bRecurse: Boolean): Boolean;
begin
  Result := Boolean(CkSFtp_SyncTreeUpload(FHandle, PAnsiChar(StrToCk(localBaseDir)), PAnsiChar(StrToCk(remoteBaseDir)), mode, LongBool(bRecurse)));
end;

function TSFtp.UploadFile(const handle: string; const fromLocalFilePath: string): Boolean;
begin
  Result := Boolean(CkSFtp_UploadFile(FHandle, PAnsiChar(StrToCk(handle)), PAnsiChar(StrToCk(fromLocalFilePath))));
end;

function TSFtp.UploadFileByName(const remoteFilePath: string; const localFilePath: string): Boolean;
begin
  Result := Boolean(CkSFtp_UploadFileByName(FHandle, PAnsiChar(StrToCk(remoteFilePath)), PAnsiChar(StrToCk(localFilePath))));
end;

function TSFtp.WriteFileText(const handle: string; const charset: string; const textData: string): Boolean;
begin
  Result := Boolean(CkSFtp_WriteFileText(FHandle, PAnsiChar(StrToCk(handle)), PAnsiChar(StrToCk(charset)), PAnsiChar(StrToCk(textData))));
end;

function TSFtp.WriteFileText32(const handle: string; offset32: Integer; const charset: string; const textData: string): Boolean;
begin
  Result := Boolean(CkSFtp_WriteFileText32(FHandle, PAnsiChar(StrToCk(handle)), offset32, PAnsiChar(StrToCk(charset)), PAnsiChar(StrToCk(textData))));
end;

function TSFtp.WriteFileText64(const handle: string; offset64: Int64; const charset: string; const textData: string): Boolean;
begin
  Result := Boolean(CkSFtp_WriteFileText64(FHandle, PAnsiChar(StrToCk(handle)), offset64, PAnsiChar(StrToCk(charset)), PAnsiChar(StrToCk(textData))));
end;

function TSFtp.WriteFileText64s(const handle: string; const offset64: string; const charset: string; const textData: string): Boolean;
begin
  Result := Boolean(CkSFtp_WriteFileText64s(FHandle, PAnsiChar(StrToCk(handle)), PAnsiChar(StrToCk(offset64)), PAnsiChar(StrToCk(charset)), PAnsiChar(StrToCk(textData))));
end;

function TSFtp.UploadSb(sb: TChilkatBase; const remoteFilePath: string; const charset: string; includeBom: Boolean): Boolean;
begin
  Result := Boolean(CkSFtp_UploadSb(FHandle, sb.Handle, PAnsiChar(StrToCk(remoteFilePath)), PAnsiChar(StrToCk(charset)), LongBool(includeBom)));
end;

function TSFtp.UploadBd(binData: TChilkatBase; const remoteFilePath: string): Boolean;
begin
  Result := Boolean(CkSFtp_UploadBd(FHandle, binData.Handle, PAnsiChar(StrToCk(remoteFilePath))));
end;

function TSFtp.DownloadBd(const remoteFilePath: string; binData: TChilkatBase): Boolean;
begin
  Result := Boolean(CkSFtp_DownloadBd(FHandle, PAnsiChar(StrToCk(remoteFilePath)), binData.Handle));
end;

function TSFtp.DownloadSb(const remoteFilePath: string; const charset: string; sb: TChilkatBase): Boolean;
begin
  Result := Boolean(CkSFtp_DownloadSb(FHandle, PAnsiChar(StrToCk(remoteFilePath)), PAnsiChar(StrToCk(charset)), sb.Handle));
end;

function TSFtp.SendIgnore: Boolean;
begin
  Result := Boolean(CkSFtp_SendIgnore(FHandle));
end;

function TSFtp.FileExists(const remotePath: string; followLinks: Boolean): Integer;
begin
  Result := CkSFtp_FileExists(FHandle, PAnsiChar(StrToCk(remotePath)), LongBool(followLinks));
end;

function TSFtp.AuthenticateSecPw(login: TChilkatBase; password: TChilkatBase): Boolean;
begin
  Result := Boolean(CkSFtp_AuthenticateSecPw(FHandle, login.Handle, password.Handle));
end;

function TSFtp.AuthenticateSecPwPk(username: TChilkatBase; password: TChilkatBase; privateKey: TChilkatBase): Boolean;
begin
  Result := Boolean(CkSFtp_AuthenticateSecPwPk(FHandle, username.Handle, password.Handle, privateKey.Handle));
end;

function TSFtp.SymLink(const oldPath: string; const newPath: string): Boolean;
begin
  Result := Boolean(CkSFtp_SymLink(FHandle, PAnsiChar(StrToCk(oldPath)), PAnsiChar(StrToCk(newPath))));
end;

function TSFtp.HardLink(const oldPath: string; const newPath: string): Boolean;
begin
  Result := Boolean(CkSFtp_HardLink(FHandle, PAnsiChar(StrToCk(oldPath)), PAnsiChar(StrToCk(newPath))));
end;

function TSFtp.Fsync(const handle: string): Boolean;
begin
  Result := Boolean(CkSFtp_Fsync(FHandle, PAnsiChar(StrToCk(handle))));
end;

function TSFtp.ReadLink(const path: string): string;
begin
  Result := CkToStr(CkSFtp_ReadLink(FHandle, PAnsiChar(StrToCk(path))));
end;

function TSFtp.WriteFileBd(const handle: string; bd: TChilkatBase): Boolean;
begin
  Result := Boolean(CkSFtp_WriteFileBd(FHandle, PAnsiChar(StrToCk(handle)), bd.Handle));
end;

function TSFtp.ReadFileBd(const handle: string; numBytes: Integer; bd: TChilkatBase): Boolean;
begin
  Result := Boolean(CkSFtp_ReadFileBd(FHandle, PAnsiChar(StrToCk(handle)), numBytes, bd.Handle));
end;

function TSFtp.StartKeyboardAuth(const login: string): string;
begin
  Result := CkToStr(CkSFtp_StartKeyboardAuth(FHandle, PAnsiChar(StrToCk(login))));
end;

function TSFtp.ContinueKeyboardAuth(const response: string): string;
begin
  Result := CkToStr(CkSFtp_ContinueKeyboardAuth(FHandle, PAnsiChar(StrToCk(response))));
end;

function TSFtp.GetHostKeyFP(const hashAlg: string; includeKeyType: Boolean; includeHashName: Boolean): string;
begin
  Result := CkToStr(CkSFtp_GetHostKeyFP(FHandle, PAnsiChar(StrToCk(hashAlg)), LongBool(includeKeyType), LongBool(includeHashName)));
end;

function TSFtp.SetAllowedAlgorithms(json: TChilkatBase): Boolean;
begin
  Result := Boolean(CkSFtp_SetAllowedAlgorithms(FHandle, json.Handle));
end;

procedure TSFtp.GetSyncedFiles(strTab: TChilkatBase);
begin
  CkSFtp_GetSyncedFiles(FHandle, strTab.Handle);
end;

procedure TSFtp.GetLastJsonData(json: TChilkatBase);
begin
  CkSFtp_GetLastJsonData(FHandle, json.Handle);
end;

function TSFtp.ReadDirListing(const handle: string; dirObj: TChilkatBase): Boolean;
begin
  Result := Boolean(CkSFtp_ReadDirListing(FHandle, PAnsiChar(StrToCk(handle)), dirObj.Handle));
end;

initialization
  Chilkat_GetProcedureAddress(CkSFtp_Create,  'CkSFtp_Create');
  Chilkat_GetProcedureAddress(CkSFtp_Dispose, 'CkSFtp_Dispose');
  Chilkat_GetProcedureAddress(CkSFtp_SetAbortCheckCallback, 'CkSFtp_SetAbortCheckCallback');
  Chilkat_GetProcedureAddress(CkSFtp_SetPercentDoneCallback, 'CkSFtp_SetPercentDoneCallback');
  Chilkat_GetProcedureAddress(CkSFtp_SetProgressInfoCallback, 'CkSFtp_SetProgressInfoCallback');
  Chilkat_GetProcedureAddress(CkSFtp_get_LastErrorHtml, 'CkSFtp_get_LastErrorHtml');
  Chilkat_GetProcedureAddress(CkSFtp_get_LastErrorText, 'CkSFtp_get_LastErrorText');
  Chilkat_GetProcedureAddress(CkSFtp_get_LastErrorXml, 'CkSFtp_get_LastErrorXml');
  Chilkat_GetProcedureAddress(CkSFtp_get_Version, 'CkSFtp_get_Version');
  Chilkat_GetProcedureAddress(CkSFtp_get_DebugLogFilePath, 'CkSFtp_get_DebugLogFilePath');
  Chilkat_GetProcedureAddress(CkSFtp_put_DebugLogFilePath, 'CkSFtp_put_DebugLogFilePath');
  Chilkat_GetProcedureAddress(CkSFtp_get_VerboseLogging, 'CkSFtp_get_VerboseLogging');
  Chilkat_GetProcedureAddress(CkSFtp_put_VerboseLogging, 'CkSFtp_put_VerboseLogging');
  Chilkat_GetProcedureAddress(CkSFtp_get_LastMethodSuccess, 'CkSFtp_get_LastMethodSuccess');
  Chilkat_GetProcedureAddress(CkSFtp_put_LastMethodSuccess, 'CkSFtp_put_LastMethodSuccess');
  Chilkat_GetProcedureAddress(CkSFtp_get_AuthFailReason, 'CkSFtp_get_AuthFailReason');
  Chilkat_GetProcedureAddress(CkSFtp_get_BandwidthThrottleDown, 'CkSFtp_get_BandwidthThrottleDown');
  Chilkat_GetProcedureAddress(CkSFtp_put_BandwidthThrottleDown, 'CkSFtp_put_BandwidthThrottleDown');
  Chilkat_GetProcedureAddress(CkSFtp_get_BandwidthThrottleUp, 'CkSFtp_get_BandwidthThrottleUp');
  Chilkat_GetProcedureAddress(CkSFtp_put_BandwidthThrottleUp, 'CkSFtp_put_BandwidthThrottleUp');
  Chilkat_GetProcedureAddress(CkSFtp_get_ClientIdentifier, 'CkSFtp_get_ClientIdentifier');
  Chilkat_GetProcedureAddress(CkSFtp_put_ClientIdentifier, 'CkSFtp_put_ClientIdentifier');
  Chilkat_GetProcedureAddress(CkSFtp_get_ClientIpAddress, 'CkSFtp_get_ClientIpAddress');
  Chilkat_GetProcedureAddress(CkSFtp_put_ClientIpAddress, 'CkSFtp_put_ClientIpAddress');
  Chilkat_GetProcedureAddress(CkSFtp_get_ConnectTimeoutMs, 'CkSFtp_get_ConnectTimeoutMs');
  Chilkat_GetProcedureAddress(CkSFtp_put_ConnectTimeoutMs, 'CkSFtp_put_ConnectTimeoutMs');
  Chilkat_GetProcedureAddress(CkSFtp_get_DisconnectCode, 'CkSFtp_get_DisconnectCode');
  Chilkat_GetProcedureAddress(CkSFtp_get_DisconnectReason, 'CkSFtp_get_DisconnectReason');
  Chilkat_GetProcedureAddress(CkSFtp_get_EnableCache, 'CkSFtp_get_EnableCache');
  Chilkat_GetProcedureAddress(CkSFtp_put_EnableCache, 'CkSFtp_put_EnableCache');
  Chilkat_GetProcedureAddress(CkSFtp_get_EnableCompression, 'CkSFtp_get_EnableCompression');
  Chilkat_GetProcedureAddress(CkSFtp_put_EnableCompression, 'CkSFtp_put_EnableCompression');
  Chilkat_GetProcedureAddress(CkSFtp_get_FilenameCharset, 'CkSFtp_get_FilenameCharset');
  Chilkat_GetProcedureAddress(CkSFtp_put_FilenameCharset, 'CkSFtp_put_FilenameCharset');
  Chilkat_GetProcedureAddress(CkSFtp_get_ForceCipher, 'CkSFtp_get_ForceCipher');
  Chilkat_GetProcedureAddress(CkSFtp_put_ForceCipher, 'CkSFtp_put_ForceCipher');
  Chilkat_GetProcedureAddress(CkSFtp_get_ForceV3, 'CkSFtp_get_ForceV3');
  Chilkat_GetProcedureAddress(CkSFtp_put_ForceV3, 'CkSFtp_put_ForceV3');
  Chilkat_GetProcedureAddress(CkSFtp_get_HeartbeatMs, 'CkSFtp_get_HeartbeatMs');
  Chilkat_GetProcedureAddress(CkSFtp_put_HeartbeatMs, 'CkSFtp_put_HeartbeatMs');
  Chilkat_GetProcedureAddress(CkSFtp_get_HostKeyAlg, 'CkSFtp_get_HostKeyAlg');
  Chilkat_GetProcedureAddress(CkSFtp_put_HostKeyAlg, 'CkSFtp_put_HostKeyAlg');
  Chilkat_GetProcedureAddress(CkSFtp_get_HostKeyFingerprint, 'CkSFtp_get_HostKeyFingerprint');
  Chilkat_GetProcedureAddress(CkSFtp_get_HttpProxyAuthMethod, 'CkSFtp_get_HttpProxyAuthMethod');
  Chilkat_GetProcedureAddress(CkSFtp_put_HttpProxyAuthMethod, 'CkSFtp_put_HttpProxyAuthMethod');
  Chilkat_GetProcedureAddress(CkSFtp_get_HttpProxyDomain, 'CkSFtp_get_HttpProxyDomain');
  Chilkat_GetProcedureAddress(CkSFtp_put_HttpProxyDomain, 'CkSFtp_put_HttpProxyDomain');
  Chilkat_GetProcedureAddress(CkSFtp_get_HttpProxyHostname, 'CkSFtp_get_HttpProxyHostname');
  Chilkat_GetProcedureAddress(CkSFtp_put_HttpProxyHostname, 'CkSFtp_put_HttpProxyHostname');
  Chilkat_GetProcedureAddress(CkSFtp_get_HttpProxyPassword, 'CkSFtp_get_HttpProxyPassword');
  Chilkat_GetProcedureAddress(CkSFtp_put_HttpProxyPassword, 'CkSFtp_put_HttpProxyPassword');
  Chilkat_GetProcedureAddress(CkSFtp_get_HttpProxyPort, 'CkSFtp_get_HttpProxyPort');
  Chilkat_GetProcedureAddress(CkSFtp_put_HttpProxyPort, 'CkSFtp_put_HttpProxyPort');
  Chilkat_GetProcedureAddress(CkSFtp_get_HttpProxyUsername, 'CkSFtp_get_HttpProxyUsername');
  Chilkat_GetProcedureAddress(CkSFtp_put_HttpProxyUsername, 'CkSFtp_put_HttpProxyUsername');
  Chilkat_GetProcedureAddress(CkSFtp_get_IdleTimeoutMs, 'CkSFtp_get_IdleTimeoutMs');
  Chilkat_GetProcedureAddress(CkSFtp_put_IdleTimeoutMs, 'CkSFtp_put_IdleTimeoutMs');
  Chilkat_GetProcedureAddress(CkSFtp_get_IncludeDotDirs, 'CkSFtp_get_IncludeDotDirs');
  Chilkat_GetProcedureAddress(CkSFtp_put_IncludeDotDirs, 'CkSFtp_put_IncludeDotDirs');
  Chilkat_GetProcedureAddress(CkSFtp_get_InitializeFailCode, 'CkSFtp_get_InitializeFailCode');
  Chilkat_GetProcedureAddress(CkSFtp_get_InitializeFailReason, 'CkSFtp_get_InitializeFailReason');
  Chilkat_GetProcedureAddress(CkSFtp_get_IsConnected, 'CkSFtp_get_IsConnected');
  Chilkat_GetProcedureAddress(CkSFtp_get_KeepSessionLog, 'CkSFtp_get_KeepSessionLog');
  Chilkat_GetProcedureAddress(CkSFtp_put_KeepSessionLog, 'CkSFtp_put_KeepSessionLog');
  Chilkat_GetProcedureAddress(CkSFtp_get_MaxPacketSize, 'CkSFtp_get_MaxPacketSize');
  Chilkat_GetProcedureAddress(CkSFtp_put_MaxPacketSize, 'CkSFtp_put_MaxPacketSize');
  Chilkat_GetProcedureAddress(CkSFtp_get_PasswordChangeRequested, 'CkSFtp_get_PasswordChangeRequested');
  Chilkat_GetProcedureAddress(CkSFtp_get_PercentDoneScale, 'CkSFtp_get_PercentDoneScale');
  Chilkat_GetProcedureAddress(CkSFtp_put_PercentDoneScale, 'CkSFtp_put_PercentDoneScale');
  Chilkat_GetProcedureAddress(CkSFtp_get_PreferIpv6, 'CkSFtp_get_PreferIpv6');
  Chilkat_GetProcedureAddress(CkSFtp_put_PreferIpv6, 'CkSFtp_put_PreferIpv6');
  Chilkat_GetProcedureAddress(CkSFtp_get_PreserveDate, 'CkSFtp_get_PreserveDate');
  Chilkat_GetProcedureAddress(CkSFtp_put_PreserveDate, 'CkSFtp_put_PreserveDate');
  Chilkat_GetProcedureAddress(CkSFtp_get_ProtocolVersion, 'CkSFtp_get_ProtocolVersion');
  Chilkat_GetProcedureAddress(CkSFtp_get_ReadDirMustMatch, 'CkSFtp_get_ReadDirMustMatch');
  Chilkat_GetProcedureAddress(CkSFtp_put_ReadDirMustMatch, 'CkSFtp_put_ReadDirMustMatch');
  Chilkat_GetProcedureAddress(CkSFtp_get_ReadDirMustNotMatch, 'CkSFtp_get_ReadDirMustNotMatch');
  Chilkat_GetProcedureAddress(CkSFtp_put_ReadDirMustNotMatch, 'CkSFtp_put_ReadDirMustNotMatch');
  Chilkat_GetProcedureAddress(CkSFtp_get_SessionLog, 'CkSFtp_get_SessionLog');
  Chilkat_GetProcedureAddress(CkSFtp_get_SoRcvBuf, 'CkSFtp_get_SoRcvBuf');
  Chilkat_GetProcedureAddress(CkSFtp_put_SoRcvBuf, 'CkSFtp_put_SoRcvBuf');
  Chilkat_GetProcedureAddress(CkSFtp_get_SoSndBuf, 'CkSFtp_get_SoSndBuf');
  Chilkat_GetProcedureAddress(CkSFtp_put_SoSndBuf, 'CkSFtp_put_SoSndBuf');
  Chilkat_GetProcedureAddress(CkSFtp_get_SocksHostname, 'CkSFtp_get_SocksHostname');
  Chilkat_GetProcedureAddress(CkSFtp_put_SocksHostname, 'CkSFtp_put_SocksHostname');
  Chilkat_GetProcedureAddress(CkSFtp_get_SocksPassword, 'CkSFtp_get_SocksPassword');
  Chilkat_GetProcedureAddress(CkSFtp_put_SocksPassword, 'CkSFtp_put_SocksPassword');
  Chilkat_GetProcedureAddress(CkSFtp_get_SocksPort, 'CkSFtp_get_SocksPort');
  Chilkat_GetProcedureAddress(CkSFtp_put_SocksPort, 'CkSFtp_put_SocksPort');
  Chilkat_GetProcedureAddress(CkSFtp_get_SocksUsername, 'CkSFtp_get_SocksUsername');
  Chilkat_GetProcedureAddress(CkSFtp_put_SocksUsername, 'CkSFtp_put_SocksUsername');
  Chilkat_GetProcedureAddress(CkSFtp_get_SocksVersion, 'CkSFtp_get_SocksVersion');
  Chilkat_GetProcedureAddress(CkSFtp_put_SocksVersion, 'CkSFtp_put_SocksVersion');
  Chilkat_GetProcedureAddress(CkSFtp_get_SyncMustMatch, 'CkSFtp_get_SyncMustMatch');
  Chilkat_GetProcedureAddress(CkSFtp_put_SyncMustMatch, 'CkSFtp_put_SyncMustMatch');
  Chilkat_GetProcedureAddress(CkSFtp_get_SyncMustNotMatch, 'CkSFtp_get_SyncMustNotMatch');
  Chilkat_GetProcedureAddress(CkSFtp_put_SyncMustNotMatch, 'CkSFtp_put_SyncMustNotMatch');
  Chilkat_GetProcedureAddress(CkSFtp_get_TcpNoDelay, 'CkSFtp_get_TcpNoDelay');
  Chilkat_GetProcedureAddress(CkSFtp_put_TcpNoDelay, 'CkSFtp_put_TcpNoDelay');
  Chilkat_GetProcedureAddress(CkSFtp_get_UploadChunkSize, 'CkSFtp_get_UploadChunkSize');
  Chilkat_GetProcedureAddress(CkSFtp_put_UploadChunkSize, 'CkSFtp_put_UploadChunkSize');
  Chilkat_GetProcedureAddress(CkSFtp_get_UtcMode, 'CkSFtp_get_UtcMode');
  Chilkat_GetProcedureAddress(CkSFtp_put_UtcMode, 'CkSFtp_put_UtcMode');
  Chilkat_GetProcedureAddress(CkSFtp_get_AbortCurrent, 'CkSFtp_get_AbortCurrent');
  Chilkat_GetProcedureAddress(CkSFtp_put_AbortCurrent, 'CkSFtp_put_AbortCurrent');
  Chilkat_GetProcedureAddress(CkSFtp_get_SyncDirectives, 'CkSFtp_get_SyncDirectives');
  Chilkat_GetProcedureAddress(CkSFtp_put_SyncDirectives, 'CkSFtp_put_SyncDirectives');
  Chilkat_GetProcedureAddress(CkSFtp_get_XferByteCount, 'CkSFtp_get_XferByteCount');
  Chilkat_GetProcedureAddress(CkSFtp_get_XferByteCount64, 'CkSFtp_get_XferByteCount64');
  Chilkat_GetProcedureAddress(CkSFtp_get_ServerIdentifier, 'CkSFtp_get_ServerIdentifier');
  Chilkat_GetProcedureAddress(CkSFtp_get_UncommonOptions, 'CkSFtp_get_UncommonOptions');
  Chilkat_GetProcedureAddress(CkSFtp_put_UncommonOptions, 'CkSFtp_put_UncommonOptions');
  Chilkat_GetProcedureAddress(CkSFtp_get_SyncMustMatchDir, 'CkSFtp_get_SyncMustMatchDir');
  Chilkat_GetProcedureAddress(CkSFtp_put_SyncMustMatchDir, 'CkSFtp_put_SyncMustMatchDir');
  Chilkat_GetProcedureAddress(CkSFtp_get_SyncMustNotMatchDir, 'CkSFtp_get_SyncMustNotMatchDir');
  Chilkat_GetProcedureAddress(CkSFtp_put_SyncMustNotMatchDir, 'CkSFtp_put_SyncMustNotMatchDir');
  Chilkat_GetProcedureAddress(CkSFtp_get_SyncCreateAllLocalDirs, 'CkSFtp_get_SyncCreateAllLocalDirs');
  Chilkat_GetProcedureAddress(CkSFtp_put_SyncCreateAllLocalDirs, 'CkSFtp_put_SyncCreateAllLocalDirs');
  Chilkat_GetProcedureAddress(CkSFtp_get_LastStatusCode, 'CkSFtp_get_LastStatusCode');
  Chilkat_GetProcedureAddress(CkSFtp_get_LastStatusMessage, 'CkSFtp_get_LastStatusMessage');
  Chilkat_GetProcedureAddress(CkSFtp_get_UserAuthBanner, 'CkSFtp_get_UserAuthBanner');
  Chilkat_GetProcedureAddress(CkSFtp_put_UserAuthBanner, 'CkSFtp_put_UserAuthBanner');
  Chilkat_GetProcedureAddress(CkSFtp_get_EnableSecrets, 'CkSFtp_get_EnableSecrets');
  Chilkat_GetProcedureAddress(CkSFtp_put_EnableSecrets, 'CkSFtp_put_EnableSecrets');
  Chilkat_GetProcedureAddress(CkSFtp_AuthenticatePk, 'CkSFtp_AuthenticatePk');
  Chilkat_GetProcedureAddress(CkSFtp_AuthenticatePw, 'CkSFtp_AuthenticatePw');
  Chilkat_GetProcedureAddress(CkSFtp_AuthenticatePwPk, 'CkSFtp_AuthenticatePwPk');
  Chilkat_GetProcedureAddress(CkSFtp_ClearCache, 'CkSFtp_ClearCache');
  Chilkat_GetProcedureAddress(CkSFtp_ClearSessionLog, 'CkSFtp_ClearSessionLog');
  Chilkat_GetProcedureAddress(CkSFtp_CloseHandle, 'CkSFtp_CloseHandle');
  Chilkat_GetProcedureAddress(CkSFtp_Connect, 'CkSFtp_Connect');
  Chilkat_GetProcedureAddress(CkSFtp_ConnectThroughSsh, 'CkSFtp_ConnectThroughSsh');
  Chilkat_GetProcedureAddress(CkSFtp_CopyFileAttr, 'CkSFtp_CopyFileAttr');
  Chilkat_GetProcedureAddress(CkSFtp_CreateDir, 'CkSFtp_CreateDir');
  Chilkat_GetProcedureAddress(CkSFtp_Disconnect, 'CkSFtp_Disconnect');
  Chilkat_GetProcedureAddress(CkSFtp_DownloadFile, 'CkSFtp_DownloadFile');
  Chilkat_GetProcedureAddress(CkSFtp_DownloadFileByName, 'CkSFtp_DownloadFileByName');
  Chilkat_GetProcedureAddress(CkSFtp_Eof, 'CkSFtp_Eof');
  Chilkat_GetProcedureAddress(CkSFtp_GetFileCreateTimeStr, 'CkSFtp_GetFileCreateTimeStr');
  Chilkat_GetProcedureAddress(CkSFtp_GetFileGroup, 'CkSFtp_GetFileGroup');
  Chilkat_GetProcedureAddress(CkSFtp_GetFileLastAccessStr, 'CkSFtp_GetFileLastAccessStr');
  Chilkat_GetProcedureAddress(CkSFtp_GetFileLastModifiedStr, 'CkSFtp_GetFileLastModifiedStr');
  Chilkat_GetProcedureAddress(CkSFtp_GetFileOwner, 'CkSFtp_GetFileOwner');
  Chilkat_GetProcedureAddress(CkSFtp_GetFilePermissions, 'CkSFtp_GetFilePermissions');
  Chilkat_GetProcedureAddress(CkSFtp_GetFileSize32, 'CkSFtp_GetFileSize32');
  Chilkat_GetProcedureAddress(CkSFtp_GetFileSize64, 'CkSFtp_GetFileSize64');
  Chilkat_GetProcedureAddress(CkSFtp_GetFileSizeStr, 'CkSFtp_GetFileSizeStr');
  Chilkat_GetProcedureAddress(CkSFtp_InitializeSftp, 'CkSFtp_InitializeSftp');
  Chilkat_GetProcedureAddress(CkSFtp_LastReadFailed, 'CkSFtp_LastReadFailed');
  Chilkat_GetProcedureAddress(CkSFtp_LastReadNumBytes, 'CkSFtp_LastReadNumBytes');
  Chilkat_GetProcedureAddress(CkSFtp_OpenDir, 'CkSFtp_OpenDir');
  Chilkat_GetProcedureAddress(CkSFtp_OpenFile, 'CkSFtp_OpenFile');
  Chilkat_GetProcedureAddress(CkSFtp_ReadFileText, 'CkSFtp_ReadFileText');
  Chilkat_GetProcedureAddress(CkSFtp_ReadFileText32, 'CkSFtp_ReadFileText32');
  Chilkat_GetProcedureAddress(CkSFtp_ReadFileText64, 'CkSFtp_ReadFileText64');
  Chilkat_GetProcedureAddress(CkSFtp_ReadFileText64s, 'CkSFtp_ReadFileText64s');
  Chilkat_GetProcedureAddress(CkSFtp_RealPath, 'CkSFtp_RealPath');
  Chilkat_GetProcedureAddress(CkSFtp_RemoveDir, 'CkSFtp_RemoveDir');
  Chilkat_GetProcedureAddress(CkSFtp_RemoveFile, 'CkSFtp_RemoveFile');
  Chilkat_GetProcedureAddress(CkSFtp_RenameFileOrDir, 'CkSFtp_RenameFileOrDir');
  Chilkat_GetProcedureAddress(CkSFtp_ResumeDownloadFileByName, 'CkSFtp_ResumeDownloadFileByName');
  Chilkat_GetProcedureAddress(CkSFtp_ResumeUploadFileByName, 'CkSFtp_ResumeUploadFileByName');
  Chilkat_GetProcedureAddress(CkSFtp_SetCreateDt, 'CkSFtp_SetCreateDt');
  Chilkat_GetProcedureAddress(CkSFtp_SetCreateTimeStr, 'CkSFtp_SetCreateTimeStr');
  Chilkat_GetProcedureAddress(CkSFtp_SetLastAccessDt, 'CkSFtp_SetLastAccessDt');
  Chilkat_GetProcedureAddress(CkSFtp_SetLastAccessTimeStr, 'CkSFtp_SetLastAccessTimeStr');
  Chilkat_GetProcedureAddress(CkSFtp_SetLastModifiedDt, 'CkSFtp_SetLastModifiedDt');
  Chilkat_GetProcedureAddress(CkSFtp_SetLastModifiedTimeStr, 'CkSFtp_SetLastModifiedTimeStr');
  Chilkat_GetProcedureAddress(CkSFtp_SetOwnerAndGroup, 'CkSFtp_SetOwnerAndGroup');
  Chilkat_GetProcedureAddress(CkSFtp_SetPermissions, 'CkSFtp_SetPermissions');
  Chilkat_GetProcedureAddress(CkSFtp_SyncTreeDownload, 'CkSFtp_SyncTreeDownload');
  Chilkat_GetProcedureAddress(CkSFtp_SyncTreeUpload, 'CkSFtp_SyncTreeUpload');
  Chilkat_GetProcedureAddress(CkSFtp_UploadFile, 'CkSFtp_UploadFile');
  Chilkat_GetProcedureAddress(CkSFtp_UploadFileByName, 'CkSFtp_UploadFileByName');
  Chilkat_GetProcedureAddress(CkSFtp_WriteFileText, 'CkSFtp_WriteFileText');
  Chilkat_GetProcedureAddress(CkSFtp_WriteFileText32, 'CkSFtp_WriteFileText32');
  Chilkat_GetProcedureAddress(CkSFtp_WriteFileText64, 'CkSFtp_WriteFileText64');
  Chilkat_GetProcedureAddress(CkSFtp_WriteFileText64s, 'CkSFtp_WriteFileText64s');
  Chilkat_GetProcedureAddress(CkSFtp_UploadSb, 'CkSFtp_UploadSb');
  Chilkat_GetProcedureAddress(CkSFtp_UploadBd, 'CkSFtp_UploadBd');
  Chilkat_GetProcedureAddress(CkSFtp_DownloadBd, 'CkSFtp_DownloadBd');
  Chilkat_GetProcedureAddress(CkSFtp_DownloadSb, 'CkSFtp_DownloadSb');
  Chilkat_GetProcedureAddress(CkSFtp_SendIgnore, 'CkSFtp_SendIgnore');
  Chilkat_GetProcedureAddress(CkSFtp_FileExists, 'CkSFtp_FileExists');
  Chilkat_GetProcedureAddress(CkSFtp_AuthenticateSecPw, 'CkSFtp_AuthenticateSecPw');
  Chilkat_GetProcedureAddress(CkSFtp_AuthenticateSecPwPk, 'CkSFtp_AuthenticateSecPwPk');
  Chilkat_GetProcedureAddress(CkSFtp_SymLink, 'CkSFtp_SymLink');
  Chilkat_GetProcedureAddress(CkSFtp_HardLink, 'CkSFtp_HardLink');
  Chilkat_GetProcedureAddress(CkSFtp_Fsync, 'CkSFtp_Fsync');
  Chilkat_GetProcedureAddress(CkSFtp_ReadLink, 'CkSFtp_ReadLink');
  Chilkat_GetProcedureAddress(CkSFtp_WriteFileBd, 'CkSFtp_WriteFileBd');
  Chilkat_GetProcedureAddress(CkSFtp_ReadFileBd, 'CkSFtp_ReadFileBd');
  Chilkat_GetProcedureAddress(CkSFtp_StartKeyboardAuth, 'CkSFtp_StartKeyboardAuth');
  Chilkat_GetProcedureAddress(CkSFtp_ContinueKeyboardAuth, 'CkSFtp_ContinueKeyboardAuth');
  Chilkat_GetProcedureAddress(CkSFtp_GetHostKeyFP, 'CkSFtp_GetHostKeyFP');
  Chilkat_GetProcedureAddress(CkSFtp_SetAllowedAlgorithms, 'CkSFtp_SetAllowedAlgorithms');
  Chilkat_GetProcedureAddress(CkSFtp_GetSyncedFiles, 'CkSFtp_GetSyncedFiles');
  Chilkat_GetProcedureAddress(CkSFtp_GetLastJsonData, 'CkSFtp_GetLastJsonData');
  Chilkat_GetProcedureAddress(CkSFtp_ReadDirListing, 'CkSFtp_ReadDirListing');

end.
