Description | Hierarchy | Fields | Methods | Properties |
type TAdPackage = class(TObject)
A package is an archive file like a tar file. When loaded, it provides a virtual file system through its property Root. Files and directories in the archive can be accessed by going though the directory tree of the file system. A package class has to be able to load and save a specific package (archive) file format and furthermore determine whether it can load an archive given in a stream (function CanOpen).
![]() |
class function CanOpen(const AStream: TStream): Boolean; virtual; abstract; |
![]() |
class function GetPackageFormatName: String; virtual; abstract; |
![]() |
class function ID: TAdVeryShortString; virtual; abstract; |
![]() |
constructor Create(const AOwnsFiles: Boolean = True); reintroduce; |
![]() |
destructor Destroy; override; |
![]() |
procedure LoadFromStream(const AStream: TStream; const AFileName: String=''); virtual; |
![]() |
procedure LoadFromFile(const FileName: String); virtual; |
![]() |
procedure SaveToStream(const AStream: TStream); virtual; abstract; |
![]() |
procedure SaveToFile(const FileName: String); virtual; |
![]() |
property OwnsFiles: Boolean read FOwnsFiles write FOwnsFiles; |
![]() |
property AutoUnload: Boolean read FAutoUnload write FAutoUnload; |
![]() |
property Root: TAdDirectory read FRoot write SetRoot; |
![]() |
property Empty: Boolean read GetEmpty write SetEmpty; |
![]() |
property FileName: String read FPath; |
![]() |
class function CanOpen(const AStream: TStream): Boolean; virtual; abstract; |
![]() |
class function GetPackageFormatName: String; virtual; abstract; |
![]() |
class function ID: TAdVeryShortString; virtual; abstract; |
![]() |
constructor Create(const AOwnsFiles: Boolean = True); reintroduce; |
![]() |
destructor Destroy; override; |
![]() |
procedure LoadFromStream(const AStream: TStream; const AFileName: String=''); virtual; |
![]() |
procedure LoadFromFile(const FileName: String); virtual; |
![]() |
procedure SaveToStream(const AStream: TStream); virtual; abstract; |
![]() |
procedure SaveToFile(const FileName: String); virtual; |
![]() |
property OwnsFiles: Boolean read FOwnsFiles write FOwnsFiles; |
![]() |
property AutoUnload: Boolean read FAutoUnload write FAutoUnload; |
![]() |
property Root: TAdDirectory read FRoot write SetRoot; |
![]() |
property Empty: Boolean read GetEmpty write SetEmpty; |
![]() |
property FileName: String read FPath; |