open_exclusive()

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

path

const char *

The path of the file to open.

flags

int

The flags for opening the file.

mode

int

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