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

Perform statvfs system call. More...

Inheritance diagram for anonymous_namespace{StatVFS.cc}::lStatVFS:
Inheritance graph
[legend]
Collaboration diagram for anonymous_namespace{StatVFS.cc}::lStatVFS:
Collaboration graph
[legend]

Public Types

typedef struct statvfs buffer_type
 

Public Member Functions

void Reset (const std::string &Filename)
 Specify the file to be used in statvfs call. More...
 
void Sync (buffer_type &StatVFSBuffer)
 Syncronize the callers buffer with the local buffer. More...
 

Protected Member Functions

virtual int eval ()
 Do the statvfs call. More...
 

Private Attributes

std::string m_filename
 The pathname of any file within the mounted filesystem. More...
 
buffer_type m_buffer_ts
 Buffer used to return information about the file system. More...
 

Detailed Description

Perform statvfs system call.

This class wraps the statvfs system call. The benifit of using this call is that the user is protected

Member Typedef Documentation

◆ buffer_type

typedef struct statvfs anonymous_namespace{StatVFS.cc}::lStatVFS::buffer_type

Member Function Documentation

◆ eval()

virtual int anonymous_namespace{StatVFS.cc}::lStatVFS::eval ( )
protectedvirtual

Do the statvfs call.

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

◆ Reset()

void anonymous_namespace{StatVFS.cc}::lStatVFS::Reset ( const std::string &  Filename)

Specify the file to be used in statvfs call.

Parameters
[in]FilenameThe pathname of any file within the mounted filesystem.

◆ Sync()

void anonymous_namespace{StatVFS.cc}::lStatVFS::Sync ( buffer_type StatVFSBuffer)

Syncronize the callers buffer with the local buffer.

Member Data Documentation

◆ m_buffer_ts

buffer_type anonymous_namespace{StatVFS.cc}::lStatVFS::m_buffer_ts
private

Buffer used to return information about the file system.

This buffer is used locally to make the call thread safe. If the native call were to use the caller's buffer directly, then in the situation where the native call times out, the application would be vulnerable to memory corruption as the callers buffer would go out of scope and the system would reclaim the resources.

◆ m_filename

std::string anonymous_namespace{StatVFS.cc}::lStatVFS::m_filename
private

The pathname of any file within the mounted filesystem.


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