Changeset 2635 for box/trunk/bin


Ignore:
Timestamp:
24/02/2010 20:12:00 (2 years ago)
Author:
chris
Message:

Add method to get updated modification time of
BackupClientFileAttributes?.

Add listing of attribute modification time to bbackupquery "list -t"
command.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/bin/bbackupquery/BackupQueries.cpp

    r2625 r2635  
    436436} 
    437437 
     438static std::string GetTimeString(BackupStoreDirectory::Entry& en, 
     439        bool useLocalTime) 
     440{ 
     441        std::ostringstream out; 
     442        out << BoxTimeToISO8601String(en.GetModificationTime(), useLocalTime); 
     443 
     444        if(en.HasAttributes()) 
     445        { 
     446                const StreamableMemBlock &storeAttr(en.GetAttributes()); 
     447                BackupClientFileAttributes attr(storeAttr); 
     448                out << "~" << BoxTimeToISO8601String(attr.GetModificationTime(), 
     449                        useLocalTime); 
     450        } 
     451         
     452        return out.str(); 
     453} 
    438454 
    439455// -------------------------------------------------------------------------- 
     
    535551                { 
    536552                        // Show UTC times... 
    537                         std::string time = BoxTimeToISO8601String( 
    538                                 en->GetModificationTime(), false); 
    539                         printf("%s ", time.c_str()); 
     553                        printf("%s ", GetTimeString(*en, false).c_str()); 
    540554                } 
    541555 
     
    543557                { 
    544558                        // Show local times... 
    545                         std::string time = BoxTimeToISO8601String( 
    546                                 en->GetModificationTime(), true); 
    547                         printf("%s ", time.c_str()); 
     559                        printf("%s ", GetTimeString(*en, true).c_str()); 
    548560                } 
    549561                 
Note: See TracChangeset for help on using the changeset viewer.