Class: TDirectory

Declaration: FileSystemInterface.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TFileSystemEntity

Inherited By:

TVolume

Purpose:

Represents a directory within a file system.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive from this class.

Concurrency:

Not multithread safe. This is a handle class.

Resource Use:

No special requirements.

Member Function: TDirectory::CreateDirectory

virtual TDirectory CreateDirectory (const TFileSystemEntityName & directoryName, const TPropertySet & initialProperties =kNoProperties, FileSystemEntitySize initialMemberCount =0)

Interface Category:

API.

Purpose:

Creates a new directory as a member of this directory.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A TDirectory object for the new directory.

Exceptions:

Throws TFileSystemObjectInvalid if the entity is uninitialized. Throws TFileSystemEntityNotAvailable if the entity cannot be found. Throws TFileSystemAccessDenied if the caller is not privileged to create a directory in this directory. Throws TFileSystemEntityAlreadyExists if a directory already exists that matches the specifications.

Concurrency:

Not multithread safe. This is a handle class.

Other Considerations:

None.

Member Function: TDirectory::DeleteAllContents

virtual void DeleteAllContents ()

Interface Category:

API.

Purpose:

Deletes all contents of a directory. Recursively deletes all contents of subdirectories.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws TFileSystemObjectInvalid if the entity is uninitialized. Throws TFileSystemEntityNotAvailable if the entity cannot be found. Throws TFileSystemEntityInUse if some contents could not be deleted.

Concurrency:

Not multithread safe. This is a handle class.

Other Considerations:

None.

Member Function: TDirectory::CreateFile

virtual TFile CreateFile (const TFileSystemEntityName & fileName, const TPropertySet & initialProperties =kNoProperties, FileSystemEntitySize initialFileSize =0)

Interface Category:

API.

Purpose:

Creates a new file as a member of this directory.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A TFile object for the new file.

Exceptions:

Throws TFileSystemObjectInvalid if the entity is uninitialized. Throws TFileSystemEntityNotAvailable if the entity cannot be found. Throws TFileSystemAccessDenied if the caller is not privileged to create a file in this directory. Throws TFileSystemEntityAlreadyExists if a file already exists that matches the specifications.

Concurrency:

Not multithread safe. This is a handle class.

Other Considerations:

None.

Member Function: TDirectory::TreeLookUp

  1. virtual TFileSystemEntity TreeLookUp (const TPropertyQuery & query) const
  2. virtual TFileSystemEntity TreeLookUp (const TPropertyQuery & query, TPropertySet & fillin) const

Interface Category:

API.

Purpose:

  1. Obtains a file system entity that matches the query. This directory and its subdirectories are searched recursively, depth first.
  2. Obtains a file system entity that matches the query, and some of its properties. This directory and its subdirectories are searched recursively, depth first.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A TFileSystemEntity found in or below this directory and that matches the query.

Exceptions:

Throws TFileSystemEntityNotAvailable if no object matching the query is found.

Concurrency:

Not multithread safe. This is a handle class.

Other Considerations:

None.

Member Function: TDirectory::~TDirectory

virtual ~ TDirectory ()

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 is a handle class.

Other Considerations:

Decrements the reference count on a valid master.

Member Function: TDirectory::operator=

  1. TDirectory & operator =(const TDirectory & right)
  2. TDirectory & 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 TDirectory.

Concurrency:

Not multithread safe. This is a handle class.

Other Considerations:

None.

Member Function: TDirectory::LookUp

  1. virtual TFileSystemEntity LookUp (const TFileSystemEntityName & entityName) const
  2. virtual TFileSystemEntity LookUp (const TFileSystemEntityName & entityName, TPropertySet & fillin) const
  3. virtual TFileSystemEntity LookUp (const TPropertyQuery & query) const
  4. virtual TFileSystemEntity LookUp (const TPropertyQuery & query, TPropertySet & fillin) const

Interface Category:

API.

Purpose:

  1. Obtains the member of this directory with the given name.
  2. Subdirectories are not searched.
  3. Obtains the member of this directory with the given name, and some of its properties.
  4. Subdirectories are not searched.
  5. Obtains a member of this directory that matches the query.
  6. Subdirectories are not searched.
  7. Obtains a member of this directory that matches the query, and some of its properties.
  8. Subdirectories are not searched.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A TFileSystemEntity that is a member of this directory and that matches the query.

Exceptions:

Throws TFileSystemEntityNotAvailable if no object matching the query is found.

Concurrency:

Not multithread safe. This is a handle class.

Other Considerations:

None.

Member Function: TDirectory::TDirectory

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

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

Concurrency:

Not multithread safe. This is a handle class.

Other Considerations:

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