ldas-tools-al 2.6.4
Public Types | Public Member Functions | Static Public Member Functions | List of all members
LDASTools::AL::Directory Class Reference

Read the contents of a directory. More...

#include <Directory.hh>

Public Types

enum  mode_type { MODE_BLOCKING , MODE_NON_BLOCKING }
 Enumerated type specifying the blocking mode. More...
 

Public Member Functions

 Directory (const std::string &DirName, bool OpenDirectory=true)
 Constructor. More...
 
 ~Directory ()
 Destructor. More...
 
void Close ()
 Close the directory.
 
bool Next ()
 

Static Public Member Functions

static int Timeout ()
 Retrieve the number of seconds any one of the calls should take.
 
static void Timeout (int Value)
 Specify the number of seconds any one of the calls should take.
 

Detailed Description

Read the contents of a directory.

This provides a system independent interface to reading the the contents of a directory. It can operate in a blocking or non-blocking mode. By default, it operates in non-blocking mode.

Member Enumeration Documentation

◆ mode_type

Enumerated type specifying the blocking mode.

This is used by the Mode method to specify the blocking mode the subsequent calls should operate in.

Enumerator
MODE_BLOCKING 

Blocking mode.

            When in blocking mode, calls made will operate in the
            current
            thread and return when the system call returns. 
MODE_NON_BLOCKING 

Non blocking mode.

            When in non-blocking mode, calls are done in a thread and
            given a specific amount of time in which to return.
            If they do not return within the alotted time, then
            an exception is thrown. 

Constructor & Destructor Documentation

◆ Directory()

LDASTools::AL::Directory::Directory ( const std::string &  DirName,
bool  OpenDirectory = true 
)

Constructor.

Construct a new instance of this object.

◆ ~Directory()

LDASTools::AL::Directory::~Directory ( )

Destructor.

Release resources back to the system.

Member Function Documentation

◆ Next()

bool LDASTools::AL::Directory::Next ( )

Retrieve the next entry. returns true if a valid entry was found, false otherwise


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