STD::EXPERIMENTAL::FILESYSTEM::PATH(3)

okay so this is the manual page for std::exper...ystem::path(3) β€” yes, the title is literally truncated like that in the header β€” and it's from the Library Functions Manual. Bestie, we're about to get into some serious C++ filesystem path realness. πŸ’…


πŸ’– NAME πŸ’–

std::experimental::filesystem::path - A filesystem path. That's the whole name. It's giving filesystem path energy, and we are obsessed. ✨


✨ SYNOPSIS ✨

First thing you gotta do is include this header, no cap:

#include <filesystem>

πŸŽ€ Classes πŸŽ€

   Classes
       class iterator
           An iterator for the components of a path.

Just one class, and it's an iterator for the components of a path. Cute. πŸŽ€

🌸 Public Types 🌸

   Public Types
       typedef iterator const_iterator
       typedef std::basic_string< value_type > string_type
       typedef char value_type

Three typedefs, all iconic. 🌸

✨ Public Member Functions ✨

Okay this is the big one. Look at all these member functions. We are not skipping a single one, fr fr.

   Public Member Functions
       template<typename _InputIterator, typename _Require =
           __detail::_Path<_InputIterator, _InputIterator>> path
           (_InputIterator __first, _InputIterator __last)
       template<typename _InputIterator, typename _Require =
           __detail::_Path<_InputIterator, _InputIterator>, typename _Require2
           = __detail::__value_type_is_char<_InputIterator>> path
           (_InputIterator __first, _InputIterator __last, const locale &__loc)
       template<typename _Source, typename _Require = __detail::_Path<_Source>>
           path (_Source const &__source)
       template<typename _Source, typename _Require = __detail::_Path<_Source>,
           typename _Require2 = __detail::__value_type_is_char<_Source>> path
           (_Source const &__source, const locale &__loc)
       path (const path &__p)
       path (path &&__p) noexcept
       path (string_type &&__source)
       template<typename _InputIterator> __detail::_Path< _InputIterator,
           _InputIterator > & append (_InputIterator __first, _InputIterator
           __last)
       template<typename _Source> __detail::_Path< _Source > & append (_Source
           const &__source)
       template<typename _InputIterator> __detail::_Path< _InputIterator,
           _InputIterator > & assign (_InputIterator __first, _InputIterator
           __last)
       template<typename _Source> __detail::_Path< _Source > & assign (_Source
           const &__source)
       path & assign (string_type &&__source)
       iterator begin () const noexcept
       const value_type * c_str () const noexcept
       void clear () noexcept
       int compare (const basic_string_view< value_type > __s) const
       int compare (const path &__p) const noexcept
       int compare (const string_type &__s) const
       int compare (const value_type *__s) const
       template<typename _InputIterator> __detail::_Path< _InputIterator,
           _InputIterator > & concat (_InputIterator __first, _InputIterator
           __last)
       template<typename _Source> __detail::_Path< _Source > & concat (_Source
           const &__x)
       bool empty () const noexcept
       iterator end () const noexcept
       path extension () const
       path filename () const
       std::string generic_string () const
       template<typename _CharT, typename _Traits = std::char_traits<_CharT>,
           typename _Allocator = std::allocator<_CharT>> std::basic_string<
           _CharT, _Traits, _Allocator > generic_string (const _Allocator
           &__a=_Allocator()) const
       std::u16string generic_u16string () const
       std::u32string generic_u32string () const
       std::string generic_u8string () const
       std::wstring generic_wstring () const
       bool has_extension () const
       bool has_filename () const
       bool has_parent_path () const
       bool has_relative_path () const
       bool has_root_directory () const
       bool has_root_name () const
       bool has_root_path () const
       bool has_stem () const
       bool is_absolute () const
       bool is_relative () const
       path & make_preferred ()
       const string_type & native () const noexcept
       operator string_type () const
       template<typename _CharT> __detail::_Path< _CharT *, _CharT * > &
           operator+= (_CharT __x)
       template<typename _Source> __detail::_Path< _Source > & operator+=
           (_Source const &__x)
       path & operator+= (basic_string_view< value_type > __x)
       path & operator+= (const path &__x)
       path & operator+= (const string_type &__x)
       path & operator+= (const value_type *__x)
       path & operator+= (value_type __x)
       template<typename _Source> __detail::_Path< _Source > & operator/=
           (_Source const &__source)
       path & operator/= (const path &__p)
       template<typename _Source> __detail::_Path< _Source > & operator=
           (_Source const &__source)
       path & operator= (const path &__p)
       path & operator= (path &&__p) noexcept
       path & operator= (string_type &&__source)
       path parent_path () const
       path relative_path () const
       path & remove_filename ()
       path & replace_extension (const path &__replacement=path())
       path & replace_filename (const path &__replacement)
       path root_directory () const
       path root_name () const
       path root_path () const
       path stem () const
       std::string string () const
       template<typename _CharT, typename _Traits = std::char_traits<_CharT>,
           typename _Allocator = std::allocator<_CharT>> std::basic_string<
           _CharT, _Traits, _Allocator > string (const _Allocator
           &__a=_Allocator()) const
       void swap (path &__rhs) noexcept
       std::u16string u16string () const
       std::u32string u32string () const
       std::string u8string () const
       std::wstring wstring () const

That's the whole roster, bestie. Every constructor, every operator, every has_ check, every string conversion. We love a thorough API. πŸ’–

πŸ‘‘ Static Public Attributes πŸ‘‘

   Static Public Attributes
       static constexpr value_type preferred_separator

One static constexpr attribute, and it's preferred_separator. Iconic behavior. πŸ‘‘


🌸 Detailed Description 🌸

A filesystem path.

That's it. That's the detailed description. It ate and left no crumbs. πŸ’…


πŸ’… Author πŸ’…

Generated automatically by Doxygen for libstdc++ from the source code.

Shoutout to Doxygen and libstdc++ for generating this whole thing automatically. No human wrote this by hand, and honestly? Respect. πŸ™ˆ


Sign-off time, bestie. This page came from libstdc++ (that's the source/version in the footer), and the footer title is std::exper...ystem::path(3). There's no date on this one, so we're just gonna say no date, periodt. Stay slay, stay iconic, and don't forget to #include <filesystem>. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms