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 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 .

property Attributes: Integer read write

AttributesString

Gets string representation of the file attributes.

property AttributesString: string read write

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 write

FullName

Gets full path of the file.

property FullName: string read write

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 write

Time

Gets or sets file time.

property Time: TDateTime read write

Version

Gets string representation of the file version.

property Version: string read write

 

Attributes

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

property Attributes: Integer read write

AttributesString

Gets string representation of the file attributes.

property AttributesString: string read write

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 write

FullName

Gets full path of the file.

property FullName: string read write

Name

Gets or sets name of the file.

property Name: string read write

Size

Gets size of the file.

property Size: Integer read write

Time

Gets or sets file time.

property Time: TDateTime read write

Version

Gets string representation of the file version.

property Version: string read write

 

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 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