![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
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:
- const TFileSystemEntityName & directoryName -The name to be assigned to the new directory.
- const TPropertySet & initialProperties =kNoProperties -The properties to be assigned to the new directory.
- FileSystemEntitySize initialMemberCount =0 -The new directory should preallocate this many slots for members. (This is a hint, not a requirement.)
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:
- const TFileSystemEntityName & fileName -The name to be assigned to the new file.
- const TPropertySet & initialProperties =kNoProperties -The properties to be assigned to the new file.
- FileSystemEntitySize initialFileSize =0 -The new file should preallocate this much space. (This is a hint, not a requirement.)
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
- virtual TFileSystemEntity TreeLookUp (const TPropertyQuery & query) const
- virtual TFileSystemEntity TreeLookUp (const TPropertyQuery & query, TPropertySet & fillin) const
Interface Category:
API.
Purpose:
- Obtains a file system entity that matches the query. This directory and its subdirectories are searched recursively, depth first.
- 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.
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=
- TDirectory & operator =(const TDirectory & right)
- TDirectory & operator =(const TFileSystemEntity & right)
Interface Category:
API.
Purpose:
- Assignment operator.
- Assignment operator.
Calling Context:
- Called when an object is assigned to another compatible object.
- Called when an object is assigned to another compatible object.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
- Throws no exceptions, passes all exceptions through.
- 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
- virtual TFileSystemEntity LookUp (const TFileSystemEntityName & entityName) const
- virtual TFileSystemEntity LookUp (const TFileSystemEntityName & entityName, TPropertySet & fillin) const
- virtual TFileSystemEntity LookUp (const TPropertyQuery & query) const
- virtual TFileSystemEntity LookUp (const TPropertyQuery & query, TPropertySet & fillin) const
Interface Category:
API.
Purpose:
- Obtains the member of this directory with the given name.
Subdirectories are not searched.
- Obtains the member of this directory with the given name, and some of its properties.
Subdirectories are not searched.
- Obtains a member of this directory that matches the query.
Subdirectories are not searched.
- Obtains a member of this directory that matches the query, and some of its properties.
Subdirectories are not searched.
Calling Context:
Call this function directly.
Parameters:
- const TFileSystemEntityName & entityName -The name of the entity to be found.
- const TFileSystemEntityName & entityName -The name of the entity to be found.
- TPropertySet & fillin -A property set to be filled in with values from the returned TFileSystemEntity.
- const TPropertyQuery & query -A query that specifies the TFileSystemEntity to be returned.
- const TPropertyQuery & query -A query that specifies the TFileSystemEntity to be returned.
- TPropertySet & fillin -A property set to be filled in with values from the returned TFileSystemEntity.
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.
- TDirectory ()
- TDirectory (const TDirectory & copy)
- TDirectory (const TFileSystemEntity & copy)
Calling Context:
- Called by the stream-in operators and anyone for fillin (for example, iterators).
- Called to copy an object.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
- Throws no exceptions, passes all exceptions through.
- Throws no exceptions, passes all exceptions through.
- 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.