Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

SLFile::Timestamp Class Reference
[segusoland C++ Library]

#include <SLFile.hpp>

Collaboration diagram for SLFile::Timestamp:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Timestamp (time_t unix_tstamp)
 Timestamp (const char *char_tstamp)
bool operator== (Timestamp &other)
const char * to_cstr ()
time_t to_time_t ()

Protected Attributes

time_t _unix_tstamp
 timestamp of last file modification

char _char_tstamp [13]
 13 is my personal heuristic for max time length ;)


Detailed Description

This class is a facility to manipulate files and directories timestamps. The timestamp is the date of last file (or directory) modification and under Linux is the number of seconds since the epoch (January 1st 1970).


Constructor & Destructor Documentation

SLFile::Timestamp::Timestamp time_t  unix_tstamp  )  [inline]
 

This constructor accept a unix time stamp (number of seconds since the epoch)

SLFile::Timestamp::Timestamp const char *  char_tstamp  )  [inline]
 

This constructor accept a char* string (UTF8 or not) that contains only numbers. It should has been obtained via Timestamp::to_cstr().


Member Function Documentation

bool SLFile::Timestamp::operator== Timestamp other  )  [inline]
 

This operator allow to compare two timestamp that may have been constructed from either number or string.

const char* SLFile::Timestamp::to_cstr  )  [inline]
 

Gets the "char *" version of this timestamp.

Returns:
a C string composed of numbers (approximatively 11 chars)

time_t SLFile::Timestamp::to_time_t  )  [inline]
 

Gets the number version of this timestamp.

Returns:
a size_t number. (#include <sys/types.h>)


The documentation for this class was generated from the following file:
Generated on Mon Apr 19 01:03:36 2004 for segusoLand by doxygen 1.3.6-20040222