std::experi...::root_name(3)
β¨ std::experi...::root_name(3) β¨
okay so this is the C++ Standard Libary manual page for std::experi...::root_name(3) β yes, Libary is literally the spelling in the manual name, no cap π. it's giving niche filesystem-path energy, and it's all about the root_name member of std::experimental::filesystem::path.
πΈ NAME πΈ
std::experimental::filesystem::path::root_name β std::experimental::filesystem::path::root_name.
π₯ Synopsis π₯
path root_name() const; (filesystem TS)
Returns the root name of the path. If the path does not include root name, returns path().
π Parameters π
(none) β no arguments, literally zero, not a single parameter, periodt.
π Return value π
The root name of the path. that's the whole answer, bestie.
π¦ Exceptions π¦
May throw implementation-defined exceptions. so like, no promises β check your implementation, fr fr.
π Example π
here's the example, copied exactly:
// Run this code
#include <experimental/filesystem>
#include <iostream>
namespace fs = std::experimental::filesystem;
int main()
{
std::cout << "Current root name is: " <<
fs::current_path().root_name() << '\n';
}
Possible output:
Current root name is: "C:"
π See also π
root_directoryβ returns the root directory of the path, if present (public member function).root_pathβ returns the root path of the path, if present (public member function).
π§ Category π§
Noindexed pages
that's the whole page, bestie π«Ά. source/version: http://cppreference.com; date: 2024.06.10. mwah π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms