coan  6.0.1
A C/C++ Configuration Analyzer
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
common::directory Struct Reference

struct common::directory encapsulates OS-neutral directory functionality. More...

#include <directory_common.h>

Inheritance diagram for common::directory:
nix::directory win::directory

Public Member Functions

std::string const & path () const
 Get the absolute path of the directory
 
unsigned last_error () const
 Get the last system error code resulting from an operation on this directory.
 
void clear_error ()
 Clear any system error code resulting from an operation on this directory.
 
bool good () const
 Say whether the directory is in a valid state.
 
 operator bool () const
 Explicitly Cast the directory to bool.
 

Protected Member Functions

 directory (std::string const &path)
 Explicitly construct a directory given a path. More...
 

Static Protected Member Functions

static bool is_dot_name (char const *leafname)
 Say whether a file leafname consists of 1 or 2 dots. More...
 

Protected Attributes

std::string _abs_path
 The absolute pathname of the directory.
 
unsigned _last_error = 0
 The last error system code returned by a directory operation.
 

Detailed Description

struct common::directory encapsulates OS-neutral directory functionality.

Definition at line 51 of file directory_common.h.

Constructor & Destructor Documentation

common::directory::directory ( std::string const &  path)
explicitprotected

Explicitly construct a directory given a path.

Parameters
pathThe pathname of the directory

Definition at line 46 of file directory_common.cpp.

Member Function Documentation

static bool common::directory::is_dot_name ( char const *  leafname)
inlinestaticprotected

Say whether a file leafname consists of 1 or 2 dots.

Parameters
leafnameThe leafname to test.
Returns
True iff leafname consists of 1 or 2 dots

The house-keeping directory entries "." and ".." are ignored in file selection.

Definition at line 93 of file directory_common.h.


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