CoreComponents 3.0.0
A Modern C++ Toolkit
|
Advisory file lock for shared access. More...
#include <cc/FileLock>
Public Member Functions | |
ReadLock (const File &file, long long start=0, long long length=0, Seek whence=Seek::Begin) | |
Create a shared file lock for a file area. | |
ReadLock (const File &file, long long start=0, Seek whence=Seek::Begin) | |
Create a shared file lock for a file area. | |
Public Member Functions inherited from FileLock | |
FileLock (const File &file, FileContention type, long long start=0, long long length=0, Seek whence=Seek::Begin) | |
Create an advisory file lock for a file area. | |
FileLock (const File &file, FileContention type, long long start, Seek whence=Seek::Begin) | |
Create an advisory file lock for a file area. | |
bool | tryAcquire () |
Try to acquire the file lock. | |
void | acquire () |
Wait and acquire lock. | |
void | release () |
Release lock. | |
Advisory file lock for shared access.
|
explicit |
Create a shared file lock for a file area.
file | File to lock |
start | Start offset of the file area |
length | Length of the file area |
whence | Interpretation of start offset |
|
explicit |
Create a shared file lock for a file area.
file | File to lock |
start | Start offset of the file area |
whence | Interpretation of start offset |