class SnapshotPersistenceMetadata
Defined at line 20 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.h
In-memory metadata about the snapshot store on disk at |snapshot_store_root|.
Note: Clients must use Add and Delete to keep the metadata in sync with the snapshot
store in the filesystem. Use with caution!
Public Methods
void SnapshotPersistenceMetadata (std::string snapshot_store_root, StorageSize max_size)
Defined at line 21 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.cc
bool RecreateFromFilesystem ()
Recreates the metadata from the snapshot store at |snapshot_store_root_|.
Returns false if the |metadata| does not accurately represent the filesystem and the underlying
directory can't safely be used.
Defined at line 33 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.cc
bool IsDirectoryUsable ()
Returns true if the directory underlying the SnapshotPersistenceMetadata can safely be used.
Defined at line 78 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.cc
bool Contains (const std::string & uuid)
Defined at line 29 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.cc
StorageSize CurrentSize ()
Defined at line 80 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.cc
StorageSize RemainingSpace ()
Defined at line 82 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.cc
const std::string & RootDir ()
Defined at line 86 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.cc
void Add (const std::string & uuid, StorageSize size, std::string_view archive_key)
Defined at line 88 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.cc
void Delete (const std::string & uuid)
Defined at line 98 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.cc
std::vector<std::string> SnapshotUuids ()
Defined at line 106 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.cc
StorageSize SnapshotSize (const std::string & uuid)
Returns the size of the snapshot archive.
Defined at line 115 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.cc
std::string SnapshotDirectory (const std::string & uuid)
Returns the directory that contains the snapshot |uuid|.
Defined at line 121 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.cc
std::string SnapshotKey (const std::string & uuid)
Returns the key for the snapshot |uuid|.
Defined at line 127 of file ../../src/developer/forensics/crash_reports/snapshot_persistence_metadata.cc