49 std::chrono::system_clock::time_point
created;
162 std::optional<PrefixSnapshot>
163 createSnapshot(
const std::filesystem::path& prefixPath,
const std::string& name,
164 const std::string& description =
"",
170 std::future<std::optional<PrefixSnapshot>>
172 const std::string& description =
"",
183 std::optional<PrefixSnapshot>
185 const std::string& parentSnapshotId,
const std::string& name,
196 std::optional<PrefixSnapshot>
createAutoSnapshot(
const std::filesystem::path& prefixPath,
197 const std::string& gameId,
198 const std::string& gameName,
199 const std::string& reason);
229 const std::vector<std::filesystem::path>& files);
246 std::vector<PrefixSnapshot>
261 std::optional<PrefixSnapshot>
getSnapshot(
const std::string& snapshotId)
const;
283 bool renameSnapshot(
const std::string& snapshotId,
const std::string& newName);
291 bool updateDescription(
const std::string& snapshotId,
const std::string& description);
304 const std::string& snapshotId2)
const;
313 const std::string& snapshotId)
const;
320 std::vector<std::filesystem::path>
listSnapshotFiles(
const std::string& snapshotId)
const;
353 bool exportSnapshot(
const std::string& snapshotId,
const std::filesystem::path& outputPath,
362 std::optional<PrefixSnapshot>
400 std::unique_ptr<Impl> impl_;
403 bool deleteSnapshotUnlocked(
const std::string& snapshotId);
404 std::string generateSnapshotId()
const;
405 bool copyPrefix(
const std::filesystem::path& src,
const std::filesystem::path& dest,
408 void loadSnapshotIndex();
409 void saveSnapshotIndex();
410 std::string detectWineVersion(
const std::filesystem::path& prefixPath)
const;
411 std::string detectArchitecture(
const std::filesystem::path& prefixPath)
const;
std::vector< PrefixSnapshot > getSnapshotsForGame(const std::string &gameId) const
Get snapshots for a specific game.
bool updateDescription(const std::string &snapshotId, const std::string &description)
Update snapshot description.
std::optional< PrefixSnapshot > importSnapshot(const std::filesystem::path &archivePath, const ProgressCallback &progressCallback=nullptr)
Import a snapshot from archive.
bool restoreSnapshot(const std::string &snapshotId, const ProgressCallback &progressCallback=nullptr)
Restore a prefix from snapshot.
bool exportSnapshot(const std::string &snapshotId, const std::filesystem::path &outputPath, const ProgressCallback &progressCallback=nullptr)
Export a snapshot to a portable archive.
void cancelOperation()
Cancel ongoing operation.
bool restoreFiles(const std::string &snapshotId, const std::vector< std::filesystem::path > &files)
Restore specific files from a snapshot.
PrefixDiff compareSnapshots(const std::string &snapshotId1, const std::string &snapshotId2) const
Compare two snapshots.
bool deleteSnapshot(const std::string &snapshotId)
Delete a snapshot.
std::vector< PrefixSnapshot > getSnapshotsForPrefix(const std::filesystem::path &prefixPath) const
Get snapshots for a specific prefix.
std::optional< PrefixSnapshot > getSnapshot(const std::string &snapshotId) const
Get a specific snapshot by ID.
std::optional< PrefixSnapshot > createAutoSnapshot(const std::filesystem::path &prefixPath, const std::string &gameId, const std::string &gameName, const std::string &reason)
Create automatic snapshot for a game.
PrefixDiff compareWithCurrent(const std::filesystem::path &prefixPath, const std::string &snapshotId) const
Compare current prefix state with a snapshot.
std::optional< PrefixSnapshot > createSnapshot(const std::filesystem::path &prefixPath, const std::string &name, const std::string &description="", const ProgressCallback &progressCallback=nullptr)
Create a full snapshot of a prefix.
std::future< std::optional< PrefixSnapshot > > createSnapshotAsync(const std::filesystem::path &prefixPath, const std::string &name, const std::string &description="", const ProgressCallback &progressCallback=nullptr)
Create a snapshot asynchronously.
std::vector< std::filesystem::path > listSnapshotFiles(const std::string &snapshotId) const
List files in a snapshot.
std::optional< PrefixSnapshot > createIncrementalSnapshot(const std::filesystem::path &prefixPath, const std::string &parentSnapshotId, const std::string &name, const ProgressCallback &progressCallback=nullptr)
Create an incremental snapshot (only changes since parent).
std::vector< PrefixSnapshot > getAllSnapshots() const
Get all snapshots.
int deleteSnapshotsForPrefix(const std::filesystem::path &prefixPath)
Delete all snapshots for a prefix.
void setCompressionEnabled(bool enabled)
Enable/disable compression for snapshots.
std::filesystem::path getSnapshotDirectory() const
Get current snapshot directory.
int64_t getTotalSnapshotSize() const
Get total space used by all snapshots.
void setSnapshotDirectory(const std::filesystem::path &path)
Set snapshot storage directory.
std::function< void(const SnapshotProgress &)> ProgressCallback
bool renameSnapshot(const std::string &snapshotId, const std::string &newName)
Rename a snapshot.
int cleanupOldAutoSnapshots(int maxAgeDays=30)
Clean up auto-snapshots older than specified days.
void setMaxStorageSize(int64_t maxBytes)
Set maximum total snapshot storage size.
int cleanupOldSnapshots(int keepCount=5)
Clean up old snapshots, keeping newest N per prefix.
std::future< bool > restoreSnapshotAsync(const std::string &snapshotId, const ProgressCallback &progressCallback=nullptr)
Restore a snapshot asynchronously.
Differences between two prefix states.
std::vector< std::filesystem::path > addedFiles
std::vector< std::filesystem::path > modifiedFiles
std::vector< std::pair< std::string, std::string > > registryChanges
Key, old->new value.
std::vector< std::filesystem::path > removedFiles
Information about a saved prefix snapshot.
std::string description
Optional description.
std::filesystem::path prefixPath
Original prefix path.
std::string getFormattedDate() const
std::string parentSnapshotId
Parent snapshot for incremental.
int64_t sizeBytes
Snapshot size on disk.
std::string architecture
win32 or win64
std::string wineVersion
Wine/Proton version at snapshot time.
std::string getFormattedSize() const
std::string gameName
Associated game name.
bool isIncremental
Whether this is incremental.
std::string gameId
Associated game ID (if any).
std::chrono::system_clock::time_point created
std::string name
User-friendly name.
int fileCount
Number of files in snapshot.
std::filesystem::path snapshotPath
Where snapshot is stored.
std::string id
Unique snapshot ID.
Progress information during snapshot operations.
std::string getStateStr() const