test_file_permission_and_size()
#
Test if a file has the specified permissions and meets size requirements.
Prototype
PUBLIC int test_file_permission_and_size(
const char *path,
int mode,
size_t min_size,
size_t max_size
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The path to the file. |
|
|
The permission mode to check (e.g., readable, writable). |
|
|
The minimum allowed size of the file in bytes. |
|
|
The maximum allowed size of the file in bytes. |
Return Value
Returns 0
if the file meets the specified permissions and size requirements, or a negative value otherwise.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples