X-Git-Url: http://git.pippins.net/embedvideo/.git/?a=blobdiff_plain;f=filedata.hpp;h=629f933493bffcc733a44cfbfc5c89d2bc2bef75;hb=302830c3b46d571d80b378fe91060a4a29e87d63;hp=0393ecd69c159ceb4d88ef53e6dfddfe4dd123b6;hpb=c1af9697acaf6dbc98afa5ffe18d2c5c7ab12c59;p=backups%2F.git diff --git a/filedata.hpp b/filedata.hpp index 0393ecd..629f933 100644 --- a/filedata.hpp +++ b/filedata.hpp @@ -1,4 +1,8 @@ +#ifndef FILEDATA_H +#define FILEDATA_H + #include +#include class FileData { public: @@ -7,20 +11,41 @@ class FileData { std::string, std::string, std::string, - unsigned int, + unsigned long, unsigned long long, - std::string + std::string, + unsigned long long = 0 ); + char getFileType() const { return filetype; } + + const std::string &getFileName() const { return filename; } + private: FileData(); FileData( const FileData & ); - char type; + char filetype; std::string permissions; - std::string user; - std::string group; - unsigned int size; + std::string username; + std::string groupname; + unsigned long filesize; unsigned long long modified_date; - std::string name; + std::string filename; + + unsigned long long last_backup_date; +}; + +class FileDataPtrCmp { + public: + + bool operator()( const FileData *a, const FileData *b ) { + return cmp( a->getFileName(), b->getFileName() ); + } + private: + std::less cmp; }; + +typedef std::set file_set; + +#endif