std::experi...is_relative(3)

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

πŸ’… NAME πŸ’…

okay bestie, this is the std::experi...is_relative(3) page from the C++ Standard Libary manual (spelling straight from the header, iykyk πŸ’€). The star of the show is:

std::experimental::filesystem::path::is_absolute,is_relative β€” std::experimental::filesystem::path::is_absolute,is_relative

These are the absolute-versus-relative checker besties for a path, fr fr. ✨


✨ Synopsis ✨

Two signatures, both const, both from the filesystem TS:

bool is_absolute() const; (1) (filesystem TS)
bool is_relative() const; (2) (filesystem TS)

So what are they doing? They check whether the path is absolute or relative. An absolute path is one where the elements of root_path() are the thing that uniquely identifies a filesystem location. The first version returns true if the path is absolute, false otherwise; the second version is the other way round. πŸ‘‘


πŸŽ€ Parameters πŸŽ€

(none) β€” literally no parameters here, bestie. She takes nothing. πŸ’…


🌸 Return value 🌸

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

πŸ¦‹ Exceptions πŸ¦‹

May throw implementation-defined exceptions. So like, don’t act surprised if your implementation has opinions. 😭


πŸ’– See also πŸ’–

  • has_root_path
  • has_root_name
  • has_root_directory
  • has_relative_path β€” checks if the corresponding path element is not empty
  • has_parent_path β€” (public member function)
  • has_filename
  • has_stem
  • has_extension

🏷️ Category 🏷️

  • Noindexed pages

source/version/date tea β˜•: http://cppreference.com Β· 2024.06.10 Β· std::experi...is_relative(3). byeee, go check your paths bestie πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from