directory Class Reference

#include <directory.hpp>

Inheritance diagram for directory:

Inheritance graph
[legend]
Collaboration diagram for directory:

Collaboration graph
[legend]

List of all members.


Detailed Description

Represents a directory on disk.

Definition at line 55 of file directory.hpp.


Public Member Functions

virtual int compare (const comparable &) const
 Compares two objects. Implementations should check the type of the given object.
 directory (const directory &)
 directory (const string &name)
 directory ()
const data::list< directory > & get_dirs () const
const data::list< file > & get_files () const
const gsgl::stringget_full_path () const
const gsgl::stringget_name () const
directoryoperator= (const directory &)
 ~directory ()

Static Public Member Functions

static void create (const gsgl::string &pathname)
static bool exists (const gsgl::string &pathname)
 Returns true if the particular directory exists.

Static Public Attributes

static const gsgl::string SEPARATOR
 The system-dependent directory separator.

Private Member Functions

void get_paths ()

Private Attributes

data::list< directorydirs
data::list< filefiles
gsgl::string full_path
gsgl::string name

Constructor & Destructor Documentation

directory (  ) 

Definition at line 64 of file directory.cpp.

References directory::get_paths(), gsgl::io::MAX_PATH_SIZE, and directory::name.

Referenced by directory::get_dirs().

directory ( const string name  ) 

Definition at line 74 of file directory.cpp.

References directory::get_paths().

~directory (  ) 

Definition at line 86 of file directory.cpp.

directory ( const directory d  ) 

Definition at line 80 of file directory.cpp.

References directory::get_paths().


Member Function Documentation

int compare ( const comparable  )  const [virtual]

Compares two objects. Implementations should check the type of the given object.

Implements comparable.

Definition at line 102 of file directory.cpp.

References string::compare(), and directory::full_path.

void create ( const gsgl::string pathname  )  [static]

Definition at line 207 of file directory.cpp.

References string::c_string(), and string::w_string().

Referenced by application::get_config_overrides().

bool exists ( const gsgl::string pathname  )  [static]

Returns true if the particular directory exists.

Definition at line 201 of file directory.cpp.

References string::c_string().

Referenced by application::get_config_overrides().

const data::list< directory > & get_dirs (  )  const

Returns:
A list of subdirectories in the directory.

Definition at line 173 of file directory.cpp.

References directory::directory(), directory::dirs, directory::full_path, and string::w_string().

const data::list< file > & get_files (  )  const

Returns:
A list of the files in the directory.

Definition at line 147 of file directory.cpp.

References directory::files, directory::full_path, and string::w_string().

const string & get_full_path (  )  const

const string & get_name (  )  const

Returns:
The path that was given upon creation of the directory object.

Definition at line 135 of file directory.cpp.

References directory::name.

void get_paths (  )  [private]

directory & operator= ( const directory d  ) 


Member Data Documentation

data::list<directory> dirs [mutable, private]

Definition at line 61 of file directory.hpp.

Referenced by directory::get_dirs(), and directory::operator=().

data::list<file> files [mutable, private]

Definition at line 60 of file directory.hpp.

Referenced by directory::get_files(), and directory::operator=().

gsgl::string name [private]

const string SEPARATOR [static]

The system-dependent directory separator.

Definition at line 90 of file directory.hpp.

Referenced by file::file(), font_impl::get_font_dir(), directory::get_paths(), and application::get_user_dir().


The documentation for this class was generated from the following files:

Generated on Sat Mar 1 13:50:06 2008 for Periapsis Project by  doxygen 1.5.5