unit Chilkat.SFtpFile;

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

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

interface

uses
  SysUtils,
  Chilkat.Base;

type

  { TSFtpFile wraps CkSFtpFile via the C bridge layer. }
  TSFtpFile = class(TChilkatBase)
  private
    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  GetCreateTimeStr: string;
    function  GetFileType: string;
    function  GetFilename: string;
    function  GetGid: Integer;
    function  GetGroup: string;
    function  GetIsAppendOnly: Boolean;
    function  GetIsArchive: Boolean;
    function  GetIsCaseInsensitive: Boolean;
    function  GetIsCompressed: Boolean;
    function  GetIsDirectory: Boolean;
    function  GetIsEncrypted: Boolean;
    function  GetIsHidden: Boolean;
    function  GetIsImmutable: Boolean;
    function  GetIsReadOnly: Boolean;
    function  GetIsRegular: Boolean;
    function  GetIsSparse: Boolean;
    function  GetIsSymLink: Boolean;
    function  GetIsSync: Boolean;
    function  GetIsSystem: Boolean;
    function  GetLastAccessTimeStr: string;
    function  GetLastModifiedTimeStr: string;
    function  GetOwner: string;
    function  GetPermissions: Integer;
    function  GetSize32: Integer;
    function  GetSize64: Int64;
    function  GetSizeStr: string;
    function  GetUid: Integer;
  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 CreateTimeStr: string read GetCreateTimeStr;
    property FileType: string read GetFileType;
    property Filename: string read GetFilename;
    property Gid: Integer read GetGid;
    property Group: string read GetGroup;
    property IsAppendOnly: Boolean read GetIsAppendOnly;
    property IsArchive: Boolean read GetIsArchive;
    property IsCaseInsensitive: Boolean read GetIsCaseInsensitive;
    property IsCompressed: Boolean read GetIsCompressed;
    property IsDirectory: Boolean read GetIsDirectory;
    property IsEncrypted: Boolean read GetIsEncrypted;
    property IsHidden: Boolean read GetIsHidden;
    property IsImmutable: Boolean read GetIsImmutable;
    property IsReadOnly: Boolean read GetIsReadOnly;
    property IsRegular: Boolean read GetIsRegular;
    property IsSparse: Boolean read GetIsSparse;
    property IsSymLink: Boolean read GetIsSymLink;
    property IsSync: Boolean read GetIsSync;
    property IsSystem: Boolean read GetIsSystem;
    property LastAccessTimeStr: string read GetLastAccessTimeStr;
    property LastModifiedTimeStr: string read GetLastModifiedTimeStr;
    property Owner: string read GetOwner;
    property Permissions: Integer read GetPermissions;
    property Size32: Integer read GetSize32;
    property Size64: Int64 read GetSize64;
    property SizeStr: string read GetSizeStr;
    property Uid: Integer read GetUid;

  end;

implementation

uses
  CkDllLoader,
  Chilkat.Utils;

{ ---- C bridge function pointer types ---- }
type
  TCkSFtpFile_Create  = function(): Pointer; cdecl;
  TCkSFtpFile_Dispose = procedure(handle: Pointer); cdecl;
  TCkSFtpFile_get_LastErrorHtml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtpFile_get_LastErrorText = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtpFile_get_LastErrorXml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtpFile_get_Version = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtpFile_get_DebugLogFilePath = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtpFile_put_DebugLogFilePath = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkSFtpFile_get_VerboseLogging = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_put_VerboseLogging = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtpFile_get_LastMethodSuccess = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_put_LastMethodSuccess = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkSFtpFile_get_CreateTimeStr = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtpFile_get_FileType = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtpFile_get_Filename = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtpFile_get_Gid = function(handle: Pointer): Integer; cdecl;
  TCkSFtpFile_get_Group = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtpFile_get_IsAppendOnly = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_IsArchive = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_IsCaseInsensitive = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_IsCompressed = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_IsDirectory = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_IsEncrypted = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_IsHidden = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_IsImmutable = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_IsReadOnly = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_IsRegular = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_IsSparse = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_IsSymLink = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_IsSync = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_IsSystem = function(handle: Pointer): LongBool; cdecl;
  TCkSFtpFile_get_LastAccessTimeStr = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtpFile_get_LastModifiedTimeStr = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtpFile_get_Owner = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtpFile_get_Permissions = function(handle: Pointer): Integer; cdecl;
  TCkSFtpFile_get_Size32 = function(handle: Pointer): Integer; cdecl;
  TCkSFtpFile_get_Size64 = function(handle: Pointer): Int64; cdecl;
  TCkSFtpFile_get_SizeStr = function(handle: Pointer): PAnsiChar; cdecl;
  TCkSFtpFile_get_Uid = function(handle: Pointer): Integer; cdecl;

{ ---- C bridge function pointer variables ---- }
var
  CkSFtpFile_Create:  TCkSFtpFile_Create  = nil;
  CkSFtpFile_Dispose: TCkSFtpFile_Dispose = nil;
  CkSFtpFile_get_LastErrorHtml: TCkSFtpFile_get_LastErrorHtml = nil;
  CkSFtpFile_get_LastErrorText: TCkSFtpFile_get_LastErrorText = nil;
  CkSFtpFile_get_LastErrorXml: TCkSFtpFile_get_LastErrorXml = nil;
  CkSFtpFile_get_Version: TCkSFtpFile_get_Version = nil;
  CkSFtpFile_get_DebugLogFilePath: TCkSFtpFile_get_DebugLogFilePath = nil;
  CkSFtpFile_put_DebugLogFilePath: TCkSFtpFile_put_DebugLogFilePath = nil;
  CkSFtpFile_get_VerboseLogging: TCkSFtpFile_get_VerboseLogging = nil;
  CkSFtpFile_put_VerboseLogging: TCkSFtpFile_put_VerboseLogging = nil;
  CkSFtpFile_get_LastMethodSuccess: TCkSFtpFile_get_LastMethodSuccess = nil;
  CkSFtpFile_put_LastMethodSuccess: TCkSFtpFile_put_LastMethodSuccess = nil;
  CkSFtpFile_get_CreateTimeStr: TCkSFtpFile_get_CreateTimeStr = nil;
  CkSFtpFile_get_FileType: TCkSFtpFile_get_FileType = nil;
  CkSFtpFile_get_Filename: TCkSFtpFile_get_Filename = nil;
  CkSFtpFile_get_Gid: TCkSFtpFile_get_Gid = nil;
  CkSFtpFile_get_Group: TCkSFtpFile_get_Group = nil;
  CkSFtpFile_get_IsAppendOnly: TCkSFtpFile_get_IsAppendOnly = nil;
  CkSFtpFile_get_IsArchive: TCkSFtpFile_get_IsArchive = nil;
  CkSFtpFile_get_IsCaseInsensitive: TCkSFtpFile_get_IsCaseInsensitive = nil;
  CkSFtpFile_get_IsCompressed: TCkSFtpFile_get_IsCompressed = nil;
  CkSFtpFile_get_IsDirectory: TCkSFtpFile_get_IsDirectory = nil;
  CkSFtpFile_get_IsEncrypted: TCkSFtpFile_get_IsEncrypted = nil;
  CkSFtpFile_get_IsHidden: TCkSFtpFile_get_IsHidden = nil;
  CkSFtpFile_get_IsImmutable: TCkSFtpFile_get_IsImmutable = nil;
  CkSFtpFile_get_IsReadOnly: TCkSFtpFile_get_IsReadOnly = nil;
  CkSFtpFile_get_IsRegular: TCkSFtpFile_get_IsRegular = nil;
  CkSFtpFile_get_IsSparse: TCkSFtpFile_get_IsSparse = nil;
  CkSFtpFile_get_IsSymLink: TCkSFtpFile_get_IsSymLink = nil;
  CkSFtpFile_get_IsSync: TCkSFtpFile_get_IsSync = nil;
  CkSFtpFile_get_IsSystem: TCkSFtpFile_get_IsSystem = nil;
  CkSFtpFile_get_LastAccessTimeStr: TCkSFtpFile_get_LastAccessTimeStr = nil;
  CkSFtpFile_get_LastModifiedTimeStr: TCkSFtpFile_get_LastModifiedTimeStr = nil;
  CkSFtpFile_get_Owner: TCkSFtpFile_get_Owner = nil;
  CkSFtpFile_get_Permissions: TCkSFtpFile_get_Permissions = nil;
  CkSFtpFile_get_Size32: TCkSFtpFile_get_Size32 = nil;
  CkSFtpFile_get_Size64: TCkSFtpFile_get_Size64 = nil;
  CkSFtpFile_get_SizeStr: TCkSFtpFile_get_SizeStr = nil;
  CkSFtpFile_get_Uid: TCkSFtpFile_get_Uid = nil;

constructor TSFtpFile.Create;
begin
  inherited Create;
  FHandle := CkSFtpFile_Create();
end;

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

function TSFtpFile.GetLastErrorHtml: string;
begin
  Result := CkToStr(CkSFtpFile_get_LastErrorHtml(FHandle));
end;

function TSFtpFile.GetLastErrorText: string;
begin
  Result := CkToStr(CkSFtpFile_get_LastErrorText(FHandle));
end;

function TSFtpFile.GetLastErrorXml: string;
begin
  Result := CkToStr(CkSFtpFile_get_LastErrorXml(FHandle));
end;

function TSFtpFile.GetVersion: string;
begin
  Result := CkToStr(CkSFtpFile_get_Version(FHandle));
end;

function TSFtpFile.GetDebugLogFilePath: string;
begin
  Result := CkToStr(CkSFtpFile_get_DebugLogFilePath(FHandle));
end;

procedure TSFtpFile.SetDebugLogFilePath(AValue: string);
begin
  CkSFtpFile_put_DebugLogFilePath(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TSFtpFile.GetVerboseLogging: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_VerboseLogging(FHandle));
end;

procedure TSFtpFile.SetVerboseLogging(AValue: Boolean);
begin
  CkSFtpFile_put_VerboseLogging(FHandle, LongBool(AValue));
end;

function TSFtpFile.GetLastMethodSuccess: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_LastMethodSuccess(FHandle));
end;

procedure TSFtpFile.SetLastMethodSuccess(AValue: Boolean);
begin
  CkSFtpFile_put_LastMethodSuccess(FHandle, LongBool(AValue));
end;

function TSFtpFile.GetCreateTimeStr: string;
begin
  Result := CkToStr(CkSFtpFile_get_CreateTimeStr(FHandle));
end;

function TSFtpFile.GetFileType: string;
begin
  Result := CkToStr(CkSFtpFile_get_FileType(FHandle));
end;

function TSFtpFile.GetFilename: string;
begin
  Result := CkToStr(CkSFtpFile_get_Filename(FHandle));
end;

function TSFtpFile.GetGid: Integer;
begin
  Result := CkSFtpFile_get_Gid(FHandle);
end;

function TSFtpFile.GetGroup: string;
begin
  Result := CkToStr(CkSFtpFile_get_Group(FHandle));
end;

function TSFtpFile.GetIsAppendOnly: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsAppendOnly(FHandle));
end;

function TSFtpFile.GetIsArchive: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsArchive(FHandle));
end;

function TSFtpFile.GetIsCaseInsensitive: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsCaseInsensitive(FHandle));
end;

function TSFtpFile.GetIsCompressed: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsCompressed(FHandle));
end;

function TSFtpFile.GetIsDirectory: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsDirectory(FHandle));
end;

function TSFtpFile.GetIsEncrypted: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsEncrypted(FHandle));
end;

function TSFtpFile.GetIsHidden: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsHidden(FHandle));
end;

function TSFtpFile.GetIsImmutable: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsImmutable(FHandle));
end;

function TSFtpFile.GetIsReadOnly: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsReadOnly(FHandle));
end;

function TSFtpFile.GetIsRegular: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsRegular(FHandle));
end;

function TSFtpFile.GetIsSparse: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsSparse(FHandle));
end;

function TSFtpFile.GetIsSymLink: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsSymLink(FHandle));
end;

function TSFtpFile.GetIsSync: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsSync(FHandle));
end;

function TSFtpFile.GetIsSystem: Boolean;
begin
  Result := Boolean(CkSFtpFile_get_IsSystem(FHandle));
end;

function TSFtpFile.GetLastAccessTimeStr: string;
begin
  Result := CkToStr(CkSFtpFile_get_LastAccessTimeStr(FHandle));
end;

function TSFtpFile.GetLastModifiedTimeStr: string;
begin
  Result := CkToStr(CkSFtpFile_get_LastModifiedTimeStr(FHandle));
end;

function TSFtpFile.GetOwner: string;
begin
  Result := CkToStr(CkSFtpFile_get_Owner(FHandle));
end;

function TSFtpFile.GetPermissions: Integer;
begin
  Result := CkSFtpFile_get_Permissions(FHandle);
end;

function TSFtpFile.GetSize32: Integer;
begin
  Result := CkSFtpFile_get_Size32(FHandle);
end;

function TSFtpFile.GetSize64: Int64;
begin
  Result := CkSFtpFile_get_Size64(FHandle);
end;

function TSFtpFile.GetSizeStr: string;
begin
  Result := CkToStr(CkSFtpFile_get_SizeStr(FHandle));
end;

function TSFtpFile.GetUid: Integer;
begin
  Result := CkSFtpFile_get_Uid(FHandle);
end;

initialization
  Chilkat_GetProcedureAddress(CkSFtpFile_Create,  'CkSFtpFile_Create');
  Chilkat_GetProcedureAddress(CkSFtpFile_Dispose, 'CkSFtpFile_Dispose');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_LastErrorHtml, 'CkSFtpFile_get_LastErrorHtml');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_LastErrorText, 'CkSFtpFile_get_LastErrorText');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_LastErrorXml, 'CkSFtpFile_get_LastErrorXml');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_Version, 'CkSFtpFile_get_Version');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_DebugLogFilePath, 'CkSFtpFile_get_DebugLogFilePath');
  Chilkat_GetProcedureAddress(CkSFtpFile_put_DebugLogFilePath, 'CkSFtpFile_put_DebugLogFilePath');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_VerboseLogging, 'CkSFtpFile_get_VerboseLogging');
  Chilkat_GetProcedureAddress(CkSFtpFile_put_VerboseLogging, 'CkSFtpFile_put_VerboseLogging');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_LastMethodSuccess, 'CkSFtpFile_get_LastMethodSuccess');
  Chilkat_GetProcedureAddress(CkSFtpFile_put_LastMethodSuccess, 'CkSFtpFile_put_LastMethodSuccess');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_CreateTimeStr, 'CkSFtpFile_get_CreateTimeStr');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_FileType, 'CkSFtpFile_get_FileType');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_Filename, 'CkSFtpFile_get_Filename');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_Gid, 'CkSFtpFile_get_Gid');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_Group, 'CkSFtpFile_get_Group');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsAppendOnly, 'CkSFtpFile_get_IsAppendOnly');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsArchive, 'CkSFtpFile_get_IsArchive');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsCaseInsensitive, 'CkSFtpFile_get_IsCaseInsensitive');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsCompressed, 'CkSFtpFile_get_IsCompressed');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsDirectory, 'CkSFtpFile_get_IsDirectory');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsEncrypted, 'CkSFtpFile_get_IsEncrypted');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsHidden, 'CkSFtpFile_get_IsHidden');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsImmutable, 'CkSFtpFile_get_IsImmutable');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsReadOnly, 'CkSFtpFile_get_IsReadOnly');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsRegular, 'CkSFtpFile_get_IsRegular');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsSparse, 'CkSFtpFile_get_IsSparse');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsSymLink, 'CkSFtpFile_get_IsSymLink');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsSync, 'CkSFtpFile_get_IsSync');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_IsSystem, 'CkSFtpFile_get_IsSystem');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_LastAccessTimeStr, 'CkSFtpFile_get_LastAccessTimeStr');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_LastModifiedTimeStr, 'CkSFtpFile_get_LastModifiedTimeStr');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_Owner, 'CkSFtpFile_get_Owner');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_Permissions, 'CkSFtpFile_get_Permissions');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_Size32, 'CkSFtpFile_get_Size32');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_Size64, 'CkSFtpFile_get_Size64');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_SizeStr, 'CkSFtpFile_get_SizeStr');
  Chilkat_GetProcedureAddress(CkSFtpFile_get_Uid, 'CkSFtpFile_get_Uid');

end.
