std::experi...::root_name(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

✨ 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