std::filesystem::path::is_absolute,is_relative

Checks whether the path is absolute or relative. An absolute path is a path that unambiguously identifies the location of a file without reference to an additional starting location. The first version returns true if the path, in native format, is absolute, false otherwise; the second version the other way round.

# Declarations

bool is_absolute() const;

(since C++17)

bool is_relative() const;

(since C++17)

# Notes

The path “/” is absolute on a POSIX OS, but is relative on Windows.

# See also