static bool HasAbsolutePath(const char* path); bool HasAbsolutePath() const;
HasAbsolutePath determines whether the file path name is an absolute or relative path.
Absolute paths can start with:
- protocols: 'file://', 'http://'
- windows drive: 'c:\'
- UNC share name: '\\share'
- unix root '/'
On the other hand, relative paths are:
- directory: 'directory/file'
- this directory: './file'
- parent directory: '../file'
Parameters |
Description |
const char* path |
The file path. |
A Boolean value of true if it is an absolute path and false if it is a relative path.