THYCustomFile

Overview

The THYCustomFile class is a base class that defines the minimum attributes of a file entry.

It is not meant to be used directly but only as a base class. THYFile and THYDirectory inherit from this class.

By default, descendants of this class are owned by a THYDirectory object, although you can create a THYFile or THYDirectory directly, to benefit from a more object-oriented approach to functions such as opening, closing and writing to a file.

Location

  • Unit: Hydra.RO.FileUtils.pas
  • Ancestry: TInterfacedObject | THYCustomFile


 

constructor Create (THYDirectory, TSearchRec)  overload virtual

Creates a new instance of the class.

constructor Create(aParent: THYDirectory; aSearchRec: TSearchRec)

Parameters:

  • aParent: Reference to a parent directory.
  • aSearchRec: Pointer to a TSearchRec structure.

constructor Create (THYDirectory, string)  overload

Creates a new instance of the class.

constructor Create(aParent: THYDirectory; const aName: string)

Parameters:

  • aParent: Reference to a parent directory.
  • aName: Name of the item.

Attributes

Gets or sets file attributes. Attributes values is a standard delphi values for TSearchRec.

property Attributes: Integer read write

AttributesString

Gets string representation of the file attributes.

property AttributesString: string read

Data

Gets or sets pointer to a custom data associated with the file.

property Data: pointer read write

Directory

Gets reference to a parent directory.

property Directory: THYDirectory read

FullName

Gets full path of the file.

property FullName: string read

GetFullName  protected virtual

Returns full path of the file.

function GetFullName: string

GetSize  protected virtual

Returns size of the file.

function GetSize: Integer

Name

Gets or sets name of the file.

property Name: string read write

Size

Gets size of the file.

property Size: Integer read

Time

Gets or sets file time.

property Time: TDateTime read write

Version

Gets string representation of the file version.

property Version: string read

 

Attributes

Gets or sets file attributes. Attributes values is a standard delphi values for TSearchRec.

property Attributes: Integer read write

AttributesString

Gets string representation of the file attributes.

property AttributesString: string read

Data

Gets or sets pointer to a custom data associated with the file.

property Data: pointer read write

Directory

Gets reference to a parent directory.

property Directory: THYDirectory read

FullName

Gets full path of the file.

property FullName: string read

Name

Gets or sets name of the file.

property Name: string read write

Size

Gets size of the file.

property Size: Integer read

Time

Gets or sets file time.

property Time: TDateTime read write

Version

Gets string representation of the file version.

property Version: string read

 

constructor Create (THYDirectory, TSearchRec)  overload virtual

Creates a new instance of the class.

constructor Create(aParent: THYDirectory; aSearchRec: TSearchRec)

Parameters:

  • aParent: Reference to a parent directory.
  • aSearchRec: Pointer to a TSearchRec structure.

constructor Create (THYDirectory, string)  overload

Creates a new instance of the class.

constructor Create(aParent: THYDirectory; const aName: string)

Parameters:

  • aParent: Reference to a parent directory.
  • aName: Name of the item.

GetFullName  protected virtual

Returns full path of the file.

function GetFullName: string

GetSize  protected virtual

Returns size of the file.

function GetSize: Integer