Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

core.sys.linux.sys.file

D header file for Linux file ops.
Authors:
Nemanja Boric
enum int LOCK_SH;
Shared lock
enum int LOCK_EX;
Exclusive lock
enum int LOCK_UN;
Unlock
enum int LOCK_NB;
Don't block when locking. Can be OR'd into one of the above.
nothrow @nogc @trusted int flock(int fd, int operation);
Apply or remove an advisory lock on an open file
Parameters:
int fd file to apply or remove lock from
int operation lock operation to perform
Returns:
0 on success, -1 on failure, with .errno set appropriately.