Main Page   Alphabetical List   Compound List   File List   Compound Members  

sord::entry Class Reference

#include <entry.h>

List of all members.

Public Types

typedef unsigned int mode_type
 type for the entry mode

typedef unsigned long size_type
 type for the entry size

typedef std::time_t time_type
 type for the entry times

enum  type {
  type_pipe, type_character, type_directory, type_block,
  type_regular, type_symlink, type_socket
}
 all possible types that an entry might be More...

enum  mode_bits {
  mode_user_read = 0x000100, mode_user_write = 0x000080, mode_user_execute = 0x000040, mode_group_read = 0x000020,
  mode_group_write = 0x000010, mode_group_execute = 0x000008, mode_other_read = 0x000004, mode_other_write = 0x000002,
  mode_other_execute = 0x000001
}
 enum to hold the mode bits More...


Public Methods

 entry (const char *name)
 entry (const entry &other)
entry & operator= (const entry &other)
void swap (entry &other)
 ~entry (void)
const char * get_name (void) const
const char * get_path (void) const
type get_type (void) const
mode_type get_mode (void) const
time_type get_mtime (void) const
time_type get_atime (void) const
size_type get_size (void) const
bool operator! (void) const


Detailed Description

The sord::entry class is used to hold one directory entry and to retreive information about that entry.


Member Enumeration Documentation

enum sord::entry::mode_bits
 

enum to hold the mode bits

Enumeration values:
mode_user_read  readable by owner
mode_user_write  writeable by owner
mode_user_execute  executable by owner
mode_group_read  readable by group
mode_group_write  writeable by group
mode_group_execute  executable by group
mode_other_read  readable by everyone else
mode_other_write  writeable by everyone else
mode_other_execute  executable by everyone else

enum sord::entry::type
 

all possible types that an entry might be

Enumeration values:
type_pipe  FIFO Pipe.
type_character  Character Special.
type_directory  Directory.
type_block  Block Special.
type_regular  Normal File.
type_symlink  Symbolic Link.
type_socket  Domain Socket.


Constructor & Destructor Documentation

sord::entry::entry const char *    name [explicit]
 

sord::entry class constructor. Given the name/path of a directory entry, the constructor will load information about that entry.

Parameters:
name  The name of a directory entry to open.
Author:
Peter Jones

sord::entry::entry const entry &    other
 

Copy information about an entry from an existing entry.

Parameters:
other  The entry to copy information from.
Author:
Peter Jones

sord::entry::~entry void   
 

sord::entry class destructor

Author:
Peter Jones


Member Function Documentation

time_type sord::entry::get_atime void    const
 

Get the time that the entry was last accessed.

Returns:
The atime
Author:
Peter Jones

mode_type sord::entry::get_mode void    const
 

Get the entry mode.

Returns:
The entry mode.
Author:
Peter Jones

time_type sord::entry::get_mtime void    const
 

Get the time that the entry was last modified.

Returns:
The mtime.
Author:
Peter Jones

const char* sord::entry::get_name void    const
 

Get the name of this directory entry. The returned string contains only the name of the entry with no path information.

Returns:
The name of the entry.
Author:
Peter Jones

const char* sord::entry::get_path void    const
 

Get the path and name for this entry. The returned string contains the name of the entry with absolute or relative path information.

Parameters:
The  path and name of the entry.
Returns:
description
Author:
Peter Jones

size_type sord::entry::get_size void    const
 

Get the size of the entry in bytes.

Returns:
The size of the entry.
Author:
Peter Jones

type sord::entry::get_type void    const
 

Get the entry type.

Returns:
The entry type.
Author:
Peter Jones

bool sord::entry::operator! void    const
 

Check to see if the entry is valid.

Returns:
True if the entry is INVALID; false if the entry is valid.
Author:
Peter Jones

entry& sord::entry::operator= const entry &    other
 

Assignment operator. Reset this entries information to that of the other entry.

Parameters:
other  The entry to copy information from.
Returns:
description
Author:
Peter Jones

void sord::entry::swap entry &    other
 

Swap this entry with another one.

Parameters:
other  The other entry to swap information with.
Author:
Peter Jones


The documentation for this class was generated from the following file:
Generated on Thu Jun 20 14:56:30 2002 for sord by doxygen1.2.16