std::filesystem::path

std::filesystem::path

Defined in header <filesystem>
class path;
(since C++17)

Objects of type path represent paths on a filesystem. Only syntactic aspects of paths are handled: the pathname may represent a non-existing path or even one that is not allowed to exist on the current file system or OS.

The path name has the following syntax:

  1. root-name(optional): identifies the root on a filesystem with multiple roots (such as "C:" or "//myserver").