IHYDirectoryAttributes
Overview
The IHYDirectoryAttributes interface defines a base set of methods and properties that is used to manage directories. In the Hydra framework, this interface is implemented by the THYDirectory and THYDirectoryManager classes.
Use Case
There is no need to use this class directly, instead, you can use the THYDirectory class to access disk directories and files. For example:
procedure ListPlugins(const Dir: string; List: TStrings);
var
HyDir: THYDirectory;
I: Integer;
begin
HyDir := THYDirectory.Create(nil, Dir);
try
HyDir.Refresh('*.dll', [roFiles]);
for I := 0 to HyDir.FileCount - 1 do
List.Add(HyDir.Files[i].Name);
finally
HyDir.Free;
end;
end;
Location
- Unit: Hydra.RO.FileUtils.pas
- Ancestry: IHYDirectoryAttributes
CopyBufferSize
Gets or sets value that indicates size of the buffer that will be used when copying files.
property CopyBufferSize: Integer read write
GetCopyBufferSize
function GetCopyBufferSize: Integer
GetOnCopyFileEnd
function GetOnCopyFileEnd: THYFileCopyEndEvent
GetOnCopyFileProgress
function GetOnCopyFileProgress: THYFileCopyProgressEvent
GetOnCopyFileStart
function GetOnCopyFileStart: THYFileCopyStartEvent
GetOnFindDirectory
function GetOnFindDirectory: THYFindDirectoryEvent
GetOnFindFile
function GetOnFindFile: THYFindFileEvent
GetOptions
function GetOptions: THYDirectoryOptions
OnCopyFileEnd
Gets or sets event handler that is triggered after file was copied.
property OnCopyFileEnd: THYFileCopyEndEvent read write
delegate: procedure OnCopyFileEnd(Sender: THYDirectory; Source: THYFile; Destination: THYFile)
OnCopyFileProgress
Gets or sets event handler that is triggered on file copy.
property OnCopyFileProgress: THYFileCopyProgressEvent read write
delegate: procedure OnCopyFileProgress(Sender: THYDirectory; Source: THYFile; const Destination: string; Position: Integer; TotalSize: Integer)
OnCopyFileStart
Gets or sets event handler that is triggered before file is copied.
property OnCopyFileStart: THYFileCopyStartEvent read write
delegate: procedure OnCopyFileStart(Sender: THYDirectory; Source: THYFile; const Destination: string)
OnFindDirectory
Gets or sets event handler that is triggered on directory search.
property OnFindDirectory: THYFindDirectoryEvent read write
delegate: procedure OnFindDirectory(Sender: THYDirectory; aDirectory: THYDirectory; var Accept: Boolean)
OnFindFile
Gets or sets event handler that is triggered on file search.
property OnFindFile: THYFindFileEvent read write
delegate: procedure OnFindFile(Sender: THYDirectory; aFile: THYFile; var Accept: Boolean)
Options
Gets or sets directory options.
property Options: THYDirectoryOptions read write
SetCopyBufferSize
procedure SetCopyBufferSize(const Value: Integer)
Parameters:
- Value:
SetOnCopyFileEnd
procedure SetOnCopyFileEnd(const Value: THYFileCopyEndEvent)
Parameters:
- Value:
SetOnCopyFileProgress
procedure SetOnCopyFileProgress(const Value: THYFileCopyProgressEvent)
Parameters:
- Value:
SetOnFileCopyStart
procedure SetOnFileCopyStart(const Value: THYFileCopyStartEvent)
Parameters:
- Value:
SetOnFindDirectory
procedure SetOnFindDirectory(const Value: THYFindDirectoryEvent)
Parameters:
- Value:
SetOnFindFile
procedure SetOnFindFile(const Value: THYFindFileEvent)
Parameters:
- Value:
SetOptions
procedure SetOptions(const Value: THYDirectoryOptions)
Parameters:
- Value:
CopyBufferSize
Gets or sets value that indicates size of the buffer that will be used when copying files.
property CopyBufferSize: Integer read write
Options
Gets or sets directory options.
property Options: THYDirectoryOptions read write
GetCopyBufferSize
function GetCopyBufferSize: Integer
GetOnCopyFileEnd
function GetOnCopyFileEnd: THYFileCopyEndEvent
GetOnCopyFileProgress
function GetOnCopyFileProgress: THYFileCopyProgressEvent
GetOnCopyFileStart
function GetOnCopyFileStart: THYFileCopyStartEvent
GetOnFindDirectory
function GetOnFindDirectory: THYFindDirectoryEvent
GetOnFindFile
function GetOnFindFile: THYFindFileEvent
GetOptions
function GetOptions: THYDirectoryOptions
SetCopyBufferSize
procedure SetCopyBufferSize(const Value: Integer)
Parameters:
- Value:
SetOnCopyFileEnd
procedure SetOnCopyFileEnd(const Value: THYFileCopyEndEvent)
Parameters:
- Value:
SetOnCopyFileProgress
procedure SetOnCopyFileProgress(const Value: THYFileCopyProgressEvent)
Parameters:
- Value:
SetOnFileCopyStart
procedure SetOnFileCopyStart(const Value: THYFileCopyStartEvent)
Parameters:
- Value:
SetOnFindDirectory
procedure SetOnFindDirectory(const Value: THYFindDirectoryEvent)
Parameters:
- Value:
SetOnFindFile
procedure SetOnFindFile(const Value: THYFindFileEvent)
Parameters:
- Value:
SetOptions
procedure SetOptions(const Value: THYDirectoryOptions)
Parameters:
- Value:
OnCopyFileEnd
Gets or sets event handler that is triggered after file was copied.
property OnCopyFileEnd: THYFileCopyEndEvent read write
delegate: procedure OnCopyFileEnd(Sender: THYDirectory; Source: THYFile; Destination: THYFile)
OnCopyFileProgress
Gets or sets event handler that is triggered on file copy.
property OnCopyFileProgress: THYFileCopyProgressEvent read write
delegate: procedure OnCopyFileProgress(Sender: THYDirectory; Source: THYFile; const Destination: string; Position: Integer; TotalSize: Integer)
OnCopyFileStart
Gets or sets event handler that is triggered before file is copied.
property OnCopyFileStart: THYFileCopyStartEvent read write
delegate: procedure OnCopyFileStart(Sender: THYDirectory; Source: THYFile; const Destination: string)
OnFindDirectory
Gets or sets event handler that is triggered on directory search.
property OnFindDirectory: THYFindDirectoryEvent read write
delegate: procedure OnFindDirectory(Sender: THYDirectory; aDirectory: THYDirectory; var Accept: Boolean)
OnFindFile
Gets or sets event handler that is triggered on file search.
property OnFindFile: THYFindFileEvent read write
delegate: procedure OnFindFile(Sender: THYDirectory; aFile: THYFile; var Accept: Boolean)