10 #ifndef SRC_INCLUDE_SMASH_FILELOCK_H_
11 #define SRC_INCLUDE_SMASH_FILELOCK_H_
39 explicit FileLock(
const std::filesystem::path& path);
Guard to create a file lock.
bool acquired_
Whether the lock has been acquired.
bool acquire()
Try to acquire the file lock.
~FileLock()
Delete the lock file when the guard is destroyed.
FileLock(const std::filesystem::path &path)
Construct a file lock guard with a lock file at the given path.
std::filesystem::path path_
Path to the file lock.