test_directory_permission()#
test_directory_permission() checks if a directory has the specified permission mode.
Prototype
int test_directory_permission(
const char *path,
mode_t permission
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
Path to the directory to be checked. |
|
|
Expected permission mode to compare against. |
Return Value
Returns 0 if the directory has the expected permission, otherwise returns -1.
Notes
This function internally retrieves the directory’s permission mode and compares it with the expected value.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples