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

struct win::directory encapsulates a MS-Windows specific directory functionality. More...

#include <directory_win.h>

Inheritance diagram for win::directory:
common::directory no_copy

Public Member Functions

 directory (std::string const &path)
 Explicitly construct given a path. More...
 
 ~directory ()
 Destructor.
 
std::string cur_memb () const
 Get the leafname of the current member of the directory.
 
bool open ()
 Open the directory. More...
 
bool close ()
 Close the directory. More...
 
std::string next ()
 Move to the next entry in the directory. More...
 
- Public Member Functions inherited from common::directory
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.
 

Private Attributes

HANDLE _handle
 Handle returned by FindFirstFile()
 
WIN32_FIND_DATA _obj_info
 Search data updated by FindFirstFile or FindFile()
 

Additional Inherited Members

- Protected Member Functions inherited from common::directory
 directory (std::string const &path)
 Explicitly construct a directory given a path. More...
 
- Static Protected Member Functions inherited from common::directory
static bool is_dot_name (char const *leafname)
 Say whether a file leafname consists of 1 or 2 dots. More...
 
- Protected Attributes inherited from common::directory
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 win::directory encapsulates a MS-Windows specific directory functionality.

Definition at line 56 of file directory_win.h.

Constructor & Destructor Documentation

win::directory::directory ( std::string const &  path)
inlineexplicit

Explicitly construct given a path.

Parameters
pathThe pathname of the directory.

Definition at line 60 of file directory_win.h.

Member Function Documentation

bool win::directory::close ( )
inline

Close the directory.

Returns
True if the directory is closed.

Definition at line 83 of file directory_win.h.

std::string win::directory::next ( )
inline

Move to the next entry in the directory.

Returns
The leafname of the next entry, if any, else an empty string.

Definition at line 92 of file directory_win.h.

bool win::directory::open ( )
inline

Open the directory.

Returns
True if the directory is opened.

Definition at line 76 of file directory_win.h.


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