+ void setFileType( char arg ) { filetype = arg; }
+ void setPermissions( const std::string &arg ) { permissions = arg; }
+ void setUserName( const std::string &arg ) { username = arg; }
+ void setGroupName( const std::string &arg ) { groupname = arg; }
+ void setFileSize( unsigned long long arg ) { filesize = arg; }
+ void setModifiedDate( unsigned long long arg ) { modified_date = arg; }
+ void setFileName( const std::string &arg ) { filename = arg; }
+ void setLastBackupDate( unsigned long long arg ) { last_backup_date = arg; }
+
+ struct LastBackupCmp {
+ bool operator()( const FileData *a, const FileData *b ) {
+ return a->getLastBackupDate() < b->getLastBackupDate();
+ }
+ };
+
+ struct SizeCmp {
+ bool operator()( const FileData *a, const FileData *b ) {
+ return a->getFileSize() < b->getFileSize();
+ }
+ };
+
+ struct NameCmp {
+ bool operator()( const FileData *a, const FileData *b ) {
+ return cmp( a->getFileName(), b->getFileName() );
+ }
+ private:
+ std::less<std::string> cmp;
+ };
+
+ static const LastBackupCmp lastbackupcmp;
+ static const SizeCmp sizecmp;
+ static const NameCmp namecmp;