Class: TFile

Declaration: FileSystemInterface.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TFileSystemEntity

Inherited By:

None.

Purpose:

A handle class representing a file on disk.

Instantiation:

Allocate on the heap or the stack. The stack is recommended, because these are handle objects.

Deriving Classes:

Do not derive from this class.

Concurrency:

Not multithread safe. This handle class is not safe. The master it refers to is.

Resource Use:

No special requirements.

Member Function: TFile::GetEndOfFile

virtual FileSystemEntitySize GetEndOfFile () const

Interface Category:

API.

Purpose:

Extracts the current end-of-data marker.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The offset of the last byte of data in this file.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe. This handle class is not safe. The master it refers to is.

Other Considerations:

None.

Member Function: TFile::~TFile

virtual ~ TFile ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe. This handle class is not safe. The master it refers to is.

Other Considerations:

None.

Member Function: TFile::operator=

  1. TFile & operator =(const TFile & right)
  2. TFile & operator =(const TFileSystemEntity & right)

Interface Category:

API.

Purpose:

  1. Assignment operator.
  2. Assignment operator

Calling Context:

  1. Called when an object is assigned to another compatible object.
  2. Called when an object is assigned to another compatible object

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

  1. Throws no exceptions, passes all exceptions through.
  2. Throws TFileSystemTypeMismatch if TFileSystemEntity & right is not a TFile.

Concurrency:

Not multithread safe. This handle class is not safe. The master it refers to is.

Other Considerations:

None.

Member Function: TFile::TFile

  1. TFile ()
  2. TFile (const TFile & copy)
  3. TFile (const TFileSystemEntity & copy)

Interface Category:

API.

Purpose:

  1. Default constructor. Must be assigned to before next use.
  2. Copy constructor: copies from TFile.
  3. Copy constructor: copies from TFileSystemEntity.

Calling Context:

  1. Called by the stream-in operators and anyone for fillin (for example, iterators).
  2. Called to copy an object.
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

  1. Throws no exceptions, passes all exceptions through.
  2. Throws no exceptions, passes all exceptions through.
  3. Throws TFileSystemTypeMismatch if TFileSystemEntity& copy is not a TFile.

Concurrency:

Not multithread safe. This handle class is not safe. The master it refers to is.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.