ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
OwnerAndGroupResolver Class Reference

Description:


Simple helper class to resolve owner and group ids to strings names. The simple approach here is to store the last recently requested ID/name pairs and return this if a subsequent request asks for the same id. Otherwise, a system call is performed.

Definition at line 22 of file ftools.hpp.

#include <ftools.hpp>

Collaboration diagram for OwnerAndGroupResolver:
[legend]

Public Method Index:

 OwnerAndGroupResolver ()
 
ALIB_API std::pair< String, StringGet (const FInfo &finfo)
 

Field Details:

◆ lastGID

FInfo::TOwnerAndGroupID lastGID
protected

The last requested group ID.

Definition at line 26 of file ftools.hpp.

◆ lastGIDResult

AString lastGIDResult
protected

The result associated with lastGID.

Definition at line 28 of file ftools.hpp.

◆ lastUID

FInfo::TOwnerAndGroupID lastUID
protected

The last requested user ID..

Definition at line 25 of file ftools.hpp.

◆ lastUIDResult

AString lastUIDResult
protected

The result associated with lastUID.

Definition at line 27 of file ftools.hpp.

Constructor(s) / Destructor Details::

◆ OwnerAndGroupResolver()

Constructor

Definition at line 32 of file ftools.hpp.

Method Details:

◆ Get()

std::pair< String, String > Get ( const FInfo & finfo)

Writes owner and group names of finfo to the given strings.

Parameters
finfoThe file to examine.
Returns
A pair of strings, denoting the owner and group name.

Definition at line 23 of file ftools.cpp.

Here is the call graph for this function:

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