file_permission()

file_permission()#

Check the permissions of a file at the specified path.

Prototype

PUBLIC int file_permission(
    const char  *path,
    int         mode
);
        

Parameters

Key

Type

Description

path

const char *

The path of the file to check.

mode

int

The permission mode to check (e.g., readable, writable).


Return Value

Returns 0 if the file has the specified permissions, otherwise returns a negative value.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples