THYDirectoryManager
Overview
The THYDirectoryManager component is used to provide simplified (RAD) access to classes such as THYDirectory and THYFile.
By dropping the component on a form, you will automatically get a reference to the uHYFileUtils.pas unit and will be able to create THYDirectory objects with a simple call to methods such as NewDirectory.
Through the use of this component and the Object Inspector, you will also able to set the event handlers that all the THYDirectories generated by this component need to use, instead of having to assign them manually in code.
The description of the events and properties of this component are identical to those of the THYDirectory class; refer to that class for more information.
Location
- Unit: Hydra.RO.FileUtils.pas
- Ancestry: TComponent | THYDirectoryManager
constructor Create override
Creates a new instance of the class.
constructor Create(aOwner: TComponent)
Parameters:
- aOwner: Reference to the owner.
CopyBufferSize
Gets or sets value that indicates size of the buffer that will be used when copying files.
property CopyBufferSize: Integer read write
DirectoryOptions
Gets or sets directory options.
property DirectoryOptions: THYDirectoryOptions read write
GetCopyBufferSize protected
function GetCopyBufferSize: Integer
GetDirectoryOptions protected
function GetDirectoryOptions: THYDirectoryOptions
GetOnCopyFileEnd protected
function GetOnCopyFileEnd: THYFileCopyEndEvent
GetOnCopyFileProgress protected
function GetOnCopyFileProgress: THYFileCopyProgressEvent
GetOnCopyFileStart protected
function GetOnCopyFileStart: THYFileCopyStartEvent
GetOnFindDirectory protected
function GetOnFindDirectory: THYFindDirectoryEvent
GetOnFindFile protected
function GetOnFindFile: THYFindFileEvent
NewDirectory
Creates a new THYDirectory object and assigns all manager attributes to this object.
function NewDirectory(const aName: string): THYDirectory
Parameters:
- aName: Name of the directory.
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)
SetCopyBufferSize protected
procedure SetCopyBufferSize(const Value: Integer)
Parameters:
- Value:
SetDirectoryOptions protected
procedure SetDirectoryOptions(const Value: THYDirectoryOptions)
Parameters:
- Value:
SetOnCopyFileEnd protected
procedure SetOnCopyFileEnd(const Value: THYFileCopyEndEvent)
Parameters:
- Value:
SetOnCopyFileProgress protected
procedure SetOnCopyFileProgress(const Value: THYFileCopyProgressEvent)
Parameters:
- Value:
SetOnFileCopyStart protected
procedure SetOnFileCopyStart(const Value: THYFileCopyStartEvent)
Parameters:
- Value:
SetOnFindDirectory protected
procedure SetOnFindDirectory(const Value: THYFindDirectoryEvent)
Parameters:
- Value:
SetOnFindFile protected
procedure SetOnFindFile(const Value: THYFindFileEvent)
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
DirectoryOptions
Gets or sets directory options.
property DirectoryOptions: THYDirectoryOptions read write
constructor Create override
Creates a new instance of the class.
constructor Create(aOwner: TComponent)
Parameters:
- aOwner: Reference to the owner.
GetCopyBufferSize protected
function GetCopyBufferSize: Integer
GetDirectoryOptions protected
function GetDirectoryOptions: THYDirectoryOptions
GetOnCopyFileEnd protected
function GetOnCopyFileEnd: THYFileCopyEndEvent
GetOnCopyFileProgress protected
function GetOnCopyFileProgress: THYFileCopyProgressEvent
GetOnCopyFileStart protected
function GetOnCopyFileStart: THYFileCopyStartEvent
GetOnFindDirectory protected
function GetOnFindDirectory: THYFindDirectoryEvent
GetOnFindFile protected
function GetOnFindFile: THYFindFileEvent
NewDirectory
Creates a new THYDirectory object and assigns all manager attributes to this object.
function NewDirectory(const aName: string): THYDirectory
Parameters:
- aName: Name of the directory.
SetCopyBufferSize protected
procedure SetCopyBufferSize(const Value: Integer)
Parameters:
- Value:
SetDirectoryOptions protected
procedure SetDirectoryOptions(const Value: THYDirectoryOptions)
Parameters:
- Value:
SetOnCopyFileEnd protected
procedure SetOnCopyFileEnd(const Value: THYFileCopyEndEvent)
Parameters:
- Value:
SetOnCopyFileProgress protected
procedure SetOnCopyFileProgress(const Value: THYFileCopyProgressEvent)
Parameters:
- Value:
SetOnFileCopyStart protected
procedure SetOnFileCopyStart(const Value: THYFileCopyStartEvent)
Parameters:
- Value:
SetOnFindDirectory protected
procedure SetOnFindDirectory(const Value: THYFindDirectoryEvent)
Parameters:
- Value:
SetOnFindFile protected
procedure SetOnFindFile(const Value: THYFindFileEvent)
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)
- THYDirectory
- THYFile