ΒΆbool is_absolute_gnu(
const llvm::Twine& path,
llvm::sys::path::Style style = Style::native)
bool is_absolute_gnu(
const llvm::Twine& path,
llvm::sys::path::Style style = Style::native)
Description
Is path absolute using GNU rules? GNU rules are: 1) Paths starting with a path separator are absolute. 2) Windows style paths are also absolute if they start with a character followed by ':'. 3) No other paths are absolute. On Windows style the path "C:\Users\Default" has "C:" as root name and "\" as root directory. Hence "C:" on Windows is absolute under GNU rules and not absolute under C++17 because it has no root directory. Likewise "/" and "\" on Windows are absolute under GNU and are not absolute under C++17 due to empty root name.
Declared at: llvm/include/llvm/Support/Path.h:541
Parameters
- const llvm::Twine& path
- Input path.
- llvm::sys::path::Style style = Style::native
- The style of \p path (e.g. Windows or POSIX). "native" style means to derive the style from the host.