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