HAZE
haze is a drop-in replacement to process water vapor to be used with FORCE
Loading...
Searching...
No Matches
File System Checks

Functions

bool fileExists (const char *filePath)
 Check if a file exists.
bool fileWritable (const char *filePath)
 Check if a file is writable, using the effective user and group identifiers of the calling process.
bool fileReadable (const char *filePath)
 Check if a file is readable, usinig the effective user and group identifiers of the calling process.

Detailed Description

Function Documentation

◆ fileExists()

bool fileExists ( const char * filePath)

Check if a file exists.

Parameters
filePathFile path to check.
Returns
true Return true if file exists.
false Return false if file does not exist.

◆ fileReadable()

bool fileReadable ( const char * filePath)

Check if a file is readable, usinig the effective user and group identifiers of the calling process.

Remarks
Race conditions may arise between calling the underlying function euidaccess and actually reading the file.
Parameters
filePathFile path to check.
Returns
true Return true if read access is granted.
false Return false if read access is not granted

◆ fileWritable()

bool fileWritable ( const char * filePath)

Check if a file is writable, using the effective user and group identifiers of the calling process.

Remarks
Race conditions may arise between calling the underlying function euidaccess and actually writing the file.
Parameters
filePathFile path to check.
Returns
true Return true if write access is granted.
false Return false if write access is not granted