std::filesystem::path::is_absolute,is_relative - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

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

From cppreference.com
< cpp‎ | filesystem‎ | path

bool is_absolute() const; | (1) | (since C++17)
bool is_relative() const; | (2) | (since C++17)

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 is absolute, false otherwise; the second version the other way round.

### [edit] Parameters

(none)

### [edit] Return value

1) true if the path is absolute, false otherwise.
2) false if the path is absolute, true otherwise.

### [edit] Exceptions

(none)

### [edit] Notes

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

### [edit] See also

absolutesystem_complete (C++17)(C++17) | composes an absolute path converts a path to an absolute path replicating OS-specific behavior (function) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/filesystem/path/is_absrel&oldid=84905"