10 // Construct a FileData object with default values
18 unsigned long long = 0
21 char getFileType() const { return filetype; }
22 const std::string &getPermissions() const { return permissions; }
23 const std::string &getUserName() const { return username; }
24 const std::string &getGroupName() const { return groupname; }
25 unsigned long long getFileSize() const { return filesize; }
26 unsigned long long getModifiedDate() const { return modified_date; }
27 const std::string &getFileName() const { return filename; }
28 unsigned long long getLastBackupDate() const { return last_backup_date; }
30 void setFileType( char arg ) { filetype = arg; }
31 void setPermissions( const std::string &arg ) { permissions = arg; }
32 void setUserName( const std::string &arg ) { username = arg; }
33 void setGroupName( const std::string &arg ) { groupname = arg; }
34 void setFileSize( unsigned long long arg ) { filesize = arg; }
35 void setModifiedDate( unsigned long long arg ) { modified_date = arg; }
36 void setFileName( const std::string &arg ) { filename = arg; }
37 void setLastBackupDate( unsigned long long arg ) { last_backup_date = arg; }
41 FileData( const FileData & );
44 std::string permissions;
46 std::string groupname;
47 unsigned long long filesize;
48 unsigned long long modified_date;
51 unsigned long long last_backup_date;
54 struct FileDataLastBackupCmp {
55 bool operator()( const FileData *a, const FileData *b ) {
56 return a->getLastBackupDate() < b->getLastBackupDate();
60 struct FileDataSizeCmp {
61 bool operator()( const FileData *a, const FileData *b ) {
62 return a->getFileSize() < b->getFileSize();
66 struct FileDataNameCmp {
67 bool operator()( const FileData *a, const FileData *b ) {
68 return cmp( a->getFileName(), b->getFileName() );
71 std::less<std::string> cmp;
74 typedef std::set<FileData*,FileDataNameCmp> file_set;
75 typedef std::vector<FileData*> file_vector;