ldas-tools-ldasgen 2.7.3
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
anonymous_namespace{Stat.cc}::lStat Class Reference

Perform stat or lstat system call. More...

Inheritance diagram for anonymous_namespace{Stat.cc}::lStat:
Inheritance graph
[legend]
Collaboration diagram for anonymous_namespace{Stat.cc}::lStat:
Collaboration graph
[legend]

Public Types

enum  mode_type { MODE_NONE , MODE_STAT , MODE_LSTAT }
 Specify the type of request. More...
 
typedef struct stat buffer_type
 

Public Member Functions

 lStat ()
 
virtual ~lStat ()
 
virtual void OnCompletion (int TaskThreadState)
 Action to be done when task completes. More...
 
void Reset (const std::string &Path, mode_type Mode)
 Initialize the instance for use. More...
 
void Sync (buffer_type &StatBuffer)
 Syncronize the callers buffer with the local buffer. More...
 

Protected Member Functions

virtual int eval ()
 Do the stat or lstat system call. More...
 

Private Attributes

mode_type m_mode
 
std::string m_path
 
buffer_type m_statbuf
 

Detailed Description

Perform stat or lstat system call.

This class wraps the lstat and stat system call. The benifit of using this call is that the caller is protected from NFS servers that are hung.

Member Typedef Documentation

◆ buffer_type

typedef struct stat anonymous_namespace{Stat.cc}::lStat::buffer_type

Member Enumeration Documentation

◆ mode_type

enum anonymous_namespace{Stat.cc}::lStat::mode_type

Specify the type of request.

Enumerator
MODE_NONE 

Special case to handle initial condition.

MODE_STAT 

Perform stat()

MODE_LSTAT 

Perform lstat()

Constructor & Destructor Documentation

◆ lStat()

anonymous_namespace{Stat.cc}::lStat::lStat ( )

◆ ~lStat()

anonymous_namespace{Stat.cc}::lStat::~lStat ( )
virtual

Member Function Documentation

◆ eval()

virtual int anonymous_namespace{Stat.cc}::lStat::eval ( )
protectedvirtual

Do the stat or lstat system call.

Returns
Upon successful completion, the value zero is returned. Upon failure, the value -1 is returned and errno is set.

◆ OnCompletion()

virtual void anonymous_namespace{Stat.cc}::lStat::OnCompletion ( int  TaskThreadState)
virtual

Action to be done when task completes.

◆ Reset()

void anonymous_namespace{Stat.cc}::lStat::Reset ( const std::string &  Path,
mode_type  Mode 
)

Initialize the instance for use.

Parameters
[in]PathThe pathname of any file within the mounted filesystem.
[in]ModeVariation of stat call to use.

◆ Sync()

void anonymous_namespace{Stat.cc}::lStat::Sync ( buffer_type StatBuffer)

Syncronize the callers buffer with the local buffer.

Member Data Documentation

◆ m_mode

mode_type anonymous_namespace{Stat.cc}::lStat::m_mode
private

◆ m_path

std::string anonymous_namespace{Stat.cc}::lStat::m_path
private

◆ m_statbuf

buffer_type anonymous_namespace{Stat.cc}::lStat::m_statbuf
private

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