sbuild::direntry Class Reference

An entry in a dirstream. More...

#include <sbuild-dirstream.h>

List of all members.

Public Member Functions

 direntry ()
 The constructor.
 direntry (const struct dirent *entry)
 The constructor.
 direntry (direntry const &orig)
 The copy constructor.
virtual ~direntry ()
 The destructor.
long inode () const
 Get the dirent inode number (d_ino).
unsigned char type () const
 Get the file type (d_type).
std::string name () const
 Get the file name (d_name).
dirent const & dirent ()
 Get the dirent.

Private Attributes

dirent data
 The underlying dirent the class is wrapping.


Detailed Description

An entry in a dirstream.

It is a wrapper around the dirent structure declared in dirent.h. Unlike a dirent pointer returned by readdir(3), a direntry does not become invalid when the dirstream it was extracted from is destroyed.

Definition at line 41 of file sbuild-dirstream.h.


Constructor & Destructor Documentation

sbuild::direntry::direntry (  )  [inline]

The constructor.

Definition at line 45 of file sbuild-dirstream.h.

References dirent().

Here is the call graph for this function:

sbuild::direntry::direntry ( const struct dirent *  entry  )  [inline]

The constructor.

Parameters:
entry the dirent to initialise the class with.

Definition at line 53 of file sbuild-dirstream.h.

References dirent().

Here is the call graph for this function:

sbuild::direntry::direntry ( direntry const &  orig  )  [inline]

The copy constructor.

Parameters:
orig the class to copy.

Definition at line 61 of file sbuild-dirstream.h.

References data, and dirent().

Here is the call graph for this function:

virtual sbuild::direntry::~direntry (  )  [inline, virtual]

The destructor.

Definition at line 65 of file sbuild-dirstream.h.


Member Function Documentation

long sbuild::direntry::inode (  )  const [inline]

Get the dirent inode number (d_ino).

Returns:
the inode number.

Definition at line 73 of file sbuild-dirstream.h.

References data.

unsigned char sbuild::direntry::type (  )  const [inline]

Get the file type (d_type).

Returns:
the file type.

Definition at line 81 of file sbuild-dirstream.h.

References data.

std::string sbuild::direntry::name (  )  const [inline]

Get the file name (d_name).

Returns:
a reference to a string containing the name.

Definition at line 89 of file sbuild-dirstream.h.

References data.

Referenced by sbuild::run_parts::run_parts().

Here is the caller graph for this function:

struct dirent const& sbuild::direntry::dirent (  )  [inline]

Get the dirent.

Returns:
a reference to the underlying dirent.

Definition at line 97 of file sbuild-dirstream.h.

References data.

Referenced by direntry().

Here is the caller graph for this function:


Member Data Documentation

struct dirent sbuild::direntry::data [private]

The underlying dirent the class is wrapping.

Definition at line 102 of file sbuild-dirstream.h.

Referenced by dirent(), direntry(), inode(), name(), and type().


The documentation for this class was generated from the following file:
Generated on Sat Jan 27 16:14:02 2007 for schroot by  doxygen 1.5.1