nick-nuti / Backup-Program

2 stars 0 forks source link

Add timestamp and filename to BackupParams #22

Closed mster closed 3 years ago

mster commented 3 years ago

We will want to consume the time of creation and filename for each digest separately. Instead of splitting the filename and timestamp from outputPath, remove output path and include ts or timestamp.

struct BackupParams
{
    std::string backupLabel;
    std::string timestamp;
    std::vector<SourceParam> sourceParams; 
};

Note: We may want to use int or uint_max for timestamp.

This way, we can combine backupLabel and timetamp to achieve the digest filename in form LABEL-TIMESTAMP.json as well as create the overall backup structure.

LABEL/
     LABEL-TIMESTAMP/
         LABEL-TIMESTAMP.json
         backup/ (contains source files)