Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

CDir Class Reference

Inheritance diagram for CDir::

CStdRegistry List of all members.

Public Methods

 CDir ()
virtual ~CDir ()
std::string Search ()
void Rewind (const std::string &="*")
void Open (const std::string &, bool=false)
bool IsSubDir ()
bool IsInDir (const std::string &, bool=false)
void CreateFile (const std::string &) const
void DeleteFile (const std::string &) const
std::string GetPath () const

Detailed Description

Wrapper class for walking file system directories. If an error occurs, a CException object is thrown.


Member Function Documentation

void CDir::CreateFile const std::string &   FileName const
 

Creates a file

Todo:
Erase he file and create a empty file
Parameters:
FileName   File name that will be created

void CDir::DeleteFile const std::string &   FileName const
 

Deletes a file.

Parameters:
FileName   File name that will be deleted

std::string CDir::GetPath   const
 

Get the current opened path.

bool CDir::IsInDir const std::string &   ComponentName,
bool   Dir = false
 

Check if a component is in the current directory.

Parameters:
ComponentName   Name of the component
Dir  
  • true if the searched component is a directory
  • false if the searched component is a file
Returns:
true if the component has been found

bool CDir::IsSubDir  
 

Checks if the current selection is a directory.

Returns:
true if the current selection is a directory.

void CDir::Open const std::string &   PathName,
bool   Create = false
 

Open a path.

Note:
Use this member function before any operation with files.
Parameters:
PathName   Name of the path that will be open.
Create   True ; the path is created if it doesn't exist.

void CDir::Rewind const std::string &   Pattern = "*"
 

Rewind the search data structure

Parameters:
Pattern   The pattern used to process the search.

std::string CDir::Search  
 

Read the search data structure to find the next pattern.

Returns:
The next file or path which corresponds to the pattern.


The documentation for this class was generated from the following files:
Top of Page
written by Pierre Rebours © 2000-2001. Terms of Use.