open_exclusive()
#
Open a file in exclusive mode, creating it if it does not exist.
Prototype
PUBLIC int open_exclusive(
const char *path,
int flags,
int mode
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The path of the file to open. |
|
|
The flags for opening the file. |
|
|
The permissions mode for the file, used if the file is created. |
Return Value
Returns the file descriptor on success, or a negative value on failure.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples