filesystem::file_time Class Reference

#include <file_time.h>

Inheritance diagram for filesystem::file_time:
Inheritance graph
[legend]
Collaboration diagram for filesystem::file_time:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 file_time ()
 sets up a bogus file_time object.
 file_time (FILE *the_FILE)
 sets up the file_time information given a the file stream of interest.
 file_time (const basis::astring &filename)
 this constructor operates on a file's name rather than a FILE stream.
 file_time (const time_t &init)
 starts the file_time with a particular "init" time.
virtual ~file_time ()
 DEFINE_CLASS_NAME ("file_time")
virtual void text_form (basis::base_string &time_string) const
 returns a definitive but sorta ugly version of the file's time.
virtual void readable_text_form (basis::base_string &time_string) const
 sets "time_string" to a human readable form of the file's time.
void reset (FILE *the_FILE)
 reacquires the time from a different FILE than constructed with.
void reset (const basis::astring &filename)
 parallel version of reset() takes a file name instead of a stream.
void reset (const time_t &init)
 parallel version of reset() takes a time_t instead of a stream.
time_t raw () const
 provides the OS version of the file's timestamp.
bool set_time (const basis::astring &filename)
 sets the time for the the "filename" to the currently held time.
virtual bool less_than (const basis::orderable &ft2) const
virtual bool equal_to (const basis::equalizable &ft2) const
virtual int packed_size () const
virtual void pack (basis::byte_array &packed_form) const
virtual bool unpack (basis::byte_array &packed_form)

Detailed Description

Definition at line 29 of file file_time.h.


Constructor & Destructor Documentation

filesystem::file_time::file_time (  ) 

sets up a bogus file_time object.

Definition at line 41 of file file_time.cpp.

References reset().

filesystem::file_time::file_time ( FILE *  the_FILE  ) 

sets up the file_time information given a the file stream of interest.

If the stream is NIL, then the file_time is set up with an invalid time.

Definition at line 43 of file file_time.cpp.

References reset().

filesystem::file_time::file_time ( const basis::astring filename  ) 

this constructor operates on a file's name rather than a FILE stream.

Definition at line 47 of file file_time.cpp.

References reset(), and basis::astring::s().

filesystem::file_time::file_time ( const time_t &  init  ) 

starts the file_time with a particular "init" time.

Definition at line 45 of file file_time.cpp.

filesystem::file_time::~file_time (  )  [virtual]

Definition at line 57 of file file_time.cpp.


Member Function Documentation

filesystem::file_time::DEFINE_CLASS_NAME ( "file_time"   ) 
bool filesystem::file_time::equal_to ( const basis::equalizable ft2  )  const [virtual]

Implements basis::equalizable.

Definition at line 109 of file file_time.cpp.

bool filesystem::file_time::less_than ( const basis::orderable ft2  )  const [virtual]

Implements basis::orderable.

Definition at line 102 of file file_time.cpp.

void filesystem::file_time::pack ( basis::byte_array packed_form  )  const [virtual]
int filesystem::file_time::packed_size (  )  const [virtual]
time_t filesystem::file_time::raw (  )  const [inline]

provides the OS version of the file's timestamp.

Definition at line 71 of file file_time.h.

Referenced by set_time().

void filesystem::file_time::readable_text_form ( basis::base_string time_string  )  const [virtual]

sets "time_string" to a human readable form of the file's time.

Definition at line 121 of file file_time.cpp.

References basis::base_string::assign(), and timely::now().

Referenced by filesystem::file_transfer_header::readable_text_form().

void filesystem::file_time::reset ( const time_t &  init  ) 

parallel version of reset() takes a time_t instead of a stream.

Definition at line 69 of file file_time.cpp.

void filesystem::file_time::reset ( const basis::astring filename  ) 

parallel version of reset() takes a file name instead of a stream.

Definition at line 71 of file file_time.cpp.

References reset(), and basis::astring::s().

void filesystem::file_time::reset ( FILE *  the_FILE  ) 

reacquires the time from a different FILE than constructed with.

this also can connect a FILE to the file_time object after using the empty constructor. further, it can also be used to refresh a file's time to account for changes in its timestamp.

Definition at line 80 of file file_time.cpp.

References fileno, fstat, FUNCDEF, LOG, and stat.

Referenced by file_time(), and reset().

bool filesystem::file_time::set_time ( const basis::astring filename  ) 

sets the time for the the "filename" to the currently held time.

Definition at line 59 of file file_time.cpp.

References raw(), and basis::astring::s().

Referenced by filesystem::heavy_file_operations::copy_file().

void filesystem::file_time::text_form ( basis::base_string time_string  )  const [virtual]

returns a definitive but sorta ugly version of the file's time.

Implements basis::text_formable.

Definition at line 116 of file file_time.cpp.

References basis::base_string::assign(), and basis::text_formable::class_name().

Referenced by filesystem::heavy_file_operations::copy_file(), and filesystem::file_transfer_header::text_form().

bool filesystem::file_time::unpack ( basis::byte_array packed_form  )  [virtual]

The documentation for this class was generated from the following files:
Generated on Sat Jan 28 04:25:32 2012 for hoople2 project by  doxygen 1.6.3