std::experi...th::has_...(3)

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

🌸 NAME 🌸

okay so bestie, this is the std::experimental::filesystem::path::has_... (3) page, and it lives in the C++ Standard Libary manual β€” yes, β€œLibary” is the manual’s own spelling, we are keeping it exactly as-is πŸ’…. It’s the whole has_* squad for path, and they all check whether the path contains the corresponding path element. 🫢

✨ Synopsis ✨

bool has_root_path() const;      (1) (filesystem TS)
bool has_root_name() const;      (2) (filesystem TS)
bool has_root_directory() const; (3) (filesystem TS)
bool has_relative_path() const;  (4) (filesystem TS)
bool has_parent_path() const;    (5) (filesystem TS)
bool has_filename() const;       (6) (filesystem TS)
bool has_stem() const;           (7) (filesystem TS)
bool has_extension() const;      (8) (filesystem TS)

Checks whether the path contains the corresponding path element.

  1. Checks whether root_path() is empty.
  2. Checks whether root_name() is empty.
  3. Checks whether root_directory() is empty.
  4. Checks whether relative_path() is empty.
  5. Checks whether parent_path() is empty.
  6. Checks whether filename() is empty.
  7. Checks whether stem() is empty.
  8. Checks whether extension() is empty.

πŸ’… Parameters πŸ’…

(none) β€” literally zero arguments, bestie. These functions are just looking at the path they already have. ✨

πŸŽ€ Return value πŸŽ€

true if the corresponding path is not empty, false otherwise. That’s the whole arc. 😭

πŸ”₯ Exceptions πŸ”₯

May throw implementation-defined exceptions. So no, it is not out here promising a totally no-drama runtime β€” implementation-defined exception tea is on the table. 🍡

πŸ¦‹ See also πŸ¦‹

  • empty β€” checks if the path is empty (public member function)

πŸ‘‘ Category πŸ‘‘

  • Noindexed pages

okay that’s the page, bestie. source/version: http://cppreference.com; date: 2024.06.10 β€” go check those paths and hydrate πŸ’–βœ¨

πŸ“¦ where this page comes from