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