1 #ifndef FILE_INFO_CLASS
2 #define FILE_INFO_CLASS
Provides a dynamically resizable ASCII character string.
A very common template for a dynamic array of bytes.
Encapsulates some measures and calculations based on a file's contents.
double _file_size
the size of the file.
file_info()
blank constructor.
virtual void pack(basis::byte_array &packed_form) const
Creates a packed form of the packable object in "packed_form".
const basis::astring & secondary() const
observes the alternate form of the name.
int _checksum
the checksum for the file.
file_time _time
the file's access time.
bool calculate(const basis::astring &prefix, bool just_size_n_time, int checksum_edge=1 *basis::KILOBYTE)
fills in the correct file size and checksum information for this file.
basis::astring text_form() const
file_similarity
this enum encapsulates how files may be compared.
@ EQUAL_CHECKSUM_TIMESTAMP_FILESIZE
virtual bool unpack(basis::byte_array &packed_form)
Restores the packable from the "packed_form".
virtual int packed_size() const
Estimates the space needed for the packed structure.
file_info & operator=(const file_info &to_copy)
DEFINE_CLASS_NAME("file_info")
const basis::byte_array & attachment() const
returns the chunk of data optionally attached to the file's info.
Provides operations commonly needed on file names.
Constants and objects used throughout HOOPLE.
const int KILOBYTE
Number of bytes in a kilobyte.
A platform independent way to obtain the timestamp of a file.