File locker.
More...
#include <FileLocker.h>
◆ FileLocker()
FileLocker::FileLocker |
( |
int32_t | fd | ) |
|
|
explicit |
Initialize a file lock based on the file descriptor
- Parameters
-
◆ ~FileLocker()
FileLocker::~FileLocker |
( |
| ) |
|
◆ lock()
bool FileLocker::lock |
( |
int64_t | start, |
|
|
int64_t | len ) |
|
nodiscard |
Apply a lock to the current file
- Parameters
-
start | Starting offset |
len | Length |
- Returns
- Whether the lock was successfully applied
References impl.
◆ lockRead()
bool FileLocker::lockRead |
( |
int64_t | start, |
|
|
int64_t | len ) |
|
nodiscard |
Apply a read lock to the current file
- Parameters
-
start | Starting offset |
len | Length |
- Returns
- Whether the lock was successfully applied
References impl.
◆ lockWrite()
bool FileLocker::lockWrite |
( |
int64_t | start, |
|
|
int64_t | len ) |
|
nodiscard |
Apply a write lock to the current file
- Parameters
-
start | Starting offset |
len | Length |
- Returns
- Whether the lock was successfully applied
References impl.
◆ unlock()
bool FileLocker::unlock |
( |
| ) |
|
|
nodiscard |
Unlock the current file
- Returns
- Whether the unlock operation was successful
References impl.
◆ impl
std::unique_ptr<Impl> sese::system::FileLocker::impl |
|
private |
The documentation for this class was generated from the following files: