feisty meow concerns codebase
2.140
|
#include <file_time.h>
Public Member Functions | |
file_time () | |
sets up a bogus file_time object. More... | |
file_time (FILE *the_FILE) | |
sets up the file_time information given a the file stream of interest. More... | |
file_time (const basis::astring &filename) | |
this constructor operates on a file's name rather than a FILE stream. More... | |
file_time (const time_t &init) | |
starts the file_time with a particular "init" time. More... | |
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. More... | |
virtual void | readable_text_form (basis::base_string &time_string) const |
sets "time_string" to a human readable form of the file's time. More... | |
void | reset (FILE *the_FILE) |
reacquires the time from a different FILE than constructed with. More... | |
void | reset (const basis::astring &filename) |
parallel version of reset() takes a file name instead of a stream. More... | |
void | reset (const time_t &init) |
parallel version of reset() takes a time_t instead of a stream. More... | |
time_t | raw () const |
provides the OS version of the file's timestamp. More... | |
bool | set_time (const basis::astring &filename) |
sets the time for the the "filename" to the currently held time. More... | |
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) |
Public Member Functions inherited from basis::text_formable | |
virtual const char * | class_name () const =0 |
Returns the bare name of this class as a constant character pointer. More... | |
Public Member Functions inherited from basis::equalizable | |
virtual bool | operator== (const equalizable &s2) const |
the virtual method for object equality. More... | |
Public Member Functions inherited from basis::orderable | |
virtual bool | operator< (const orderable &s2) const |
the virtual method for object ordering. More... | |
Definition at line 29 of file file_time.h.
filesystem::file_time::file_time | ( | ) |
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 NULL_POINTER, 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.
|
virtual |
Definition at line 57 of file file_time.cpp.
filesystem::file_time::DEFINE_CLASS_NAME | ( | "file_time" | ) |
|
virtual |
Implements basis::equalizable.
Definition at line 109 of file file_time.cpp.
|
virtual |
Implements basis::orderable.
Definition at line 102 of file file_time.cpp.
|
virtual |
Definition at line 134 of file file_time.cpp.
References basis::astring::pack().
Referenced by filesystem::file_info::pack(), and filesystem::file_transfer_header::pack().
|
virtual |
Definition at line 132 of file file_time.cpp.
Referenced by manifest_chunk::packed_filetime_size(), filesystem::file_info::packed_size(), and filesystem::file_transfer_header::packed_size().
|
inline |
provides the OS version of the file's timestamp.
Definition at line 71 of file file_time.h.
Referenced by set_time().
|
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 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 | ( | 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 | ( | 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().
|
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().
|
virtual |
Definition at line 137 of file file_time.cpp.
References basis::astring::convert(), and basis::astring::unpack().
Referenced by filesystem::file_info::unpack(), and filesystem::file_transfer_header::unpack().