#include <filetime.h>
Inheritance diagram for file_time:


Public Member Functions | |
| file_time (FILE *the_file=NIL) | |
| sets up the file_time information given a the file stream of interest. | |
| file_time (const istring &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 () |
| IMPLEMENT_CLASS_NAME ("file_time") | |
| void | reset (FILE *the_file) |
| reacquires the time from a different FILE than constructed with. | |
| void | reset (const istring &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. | |
| bool | operator< (const file_time &ft2) const |
| bool | operator<= (const file_time &ft2) const |
| bool | operator== (const file_time &ft2) const |
| bool | operator!= (const file_time &ft2) const |
| bool | operator> (const file_time &ft2) const |
| bool | operator>= (const file_time &ft2) const |
| time_t | raw () const |
| provides the OS version of the file's timestamp. | |
| virtual void | pack (byte_array &packed_form) const |
| Creates a packed form of the packable object in "packed_form". | |
| virtual bool | unpack (byte_array &packed_form) |
| Restores the packable from the "packed_form". | |
Definition at line 29 of file filetime.h.
| file_time::file_time | ( | FILE * | the_file = NIL |
) |
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 29 of file filetime.cpp.
References reset().
| file_time::file_time | ( | const istring & | filename | ) |
this constructor operates on a file's name rather than a FILE stream.
Definition at line 37 of file filetime.cpp.
References reset(), and istring::s().
| file_time::file_time | ( | const time_t & | init | ) |
| file_time::~file_time | ( | ) | [virtual] |
Definition at line 47 of file filetime.cpp.
| file_time::IMPLEMENT_CLASS_NAME | ( | "file_time" | ) |
| void 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 60 of file filetime.cpp.
References fileno, fstat, FUNCDEF, LOG, and stat.
Referenced by file_time(), and reset().
| void file_time::reset | ( | const istring & | filename | ) |
parallel version of reset() takes a file name instead of a stream.
Definition at line 51 of file filetime.cpp.
References reset(), and istring::s().
| void file_time::reset | ( | const time_t & | init | ) |
parallel version of reset() takes a time_t instead of a stream.
Definition at line 49 of file filetime.cpp.
| bool file_time::operator< | ( | const file_time & | ft2 | ) | const |
| bool file_time::operator<= | ( | const file_time & | ft2 | ) | const |
| bool file_time::operator== | ( | const file_time & | ft2 | ) | const |
| bool file_time::operator!= | ( | const file_time & | ft2 | ) | const |
| bool file_time::operator> | ( | const file_time & | ft2 | ) | const |
| bool file_time::operator>= | ( | const file_time & | ft2 | ) | const |
| time_t file_time::raw | ( | ) | const [inline] |
| void file_time::pack | ( | byte_array & | packed_form | ) | const [virtual] |
Creates a packed form of the packable object in "packed_form".
This must append to the data in "packed_form" rather than clearing prior contents.
Implements packable.
Definition at line 102 of file filetime.cpp.
References array< contents >::insert().
| bool file_time::unpack | ( | byte_array & | packed_form | ) | [virtual] |
Restores the packable from the "packed_form".
This object becomes the unpacked form, and therefore must lose any of its prior contents that depend on the data in "packed_form". This is up to the derived unpack function to figure out. The "packed_form" is modified by extracting all of the pieces that are used for this object; the remainder stays in "packed_form". true is returned if the unpacking was successful.
Implements packable.
Definition at line 130 of file filetime.cpp.
References array< contents >::length(), and array< contents >::zap().
1.5.1