std::experi...is_directory(3)

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

πŸŽ€ NAME πŸŽ€

okay so bestie, welcome to the <pink>std::experi...is_directory(3)</pink> page from the <purple>C++ Standard Libary</purple> manual. The main character is std::experimental::filesystem::is_directory β€” like, the function that checks whether a file status or path is a directory. That’s the whole NAME section, periodt. πŸ’…βœ¨


🌸 Synopsis 🌸

Defined in header <experimental/filesystem> 🫢

bool is_directory( file_status s );                 (1) (filesystem TS)
bool is_directory( const path& p );                 (2) (filesystem TS)
bool is_directory( const path& p, error_code& ec ); (3) (filesystem TS)

Checks if the given file status or path corresponds to a directory.

  1. (1) is equivalent to s.type() == file_type::directory.
  2. (2) is equivalent to is_directory(status(p)).
  3. (3) is equivalent to is_directory(status(p, ec)). Returns false if error occurs.

🫢 Parameters 🫢

  • s β€” file status to check.
  • p β€” path to query.
  • ec β€” error code to modify in case of errors.

✨ Return value ✨

true if the given path or file status corresponds to a directory, false otherwise. Simple as that, bestie. πŸ’–


πŸ’€ Exceptions πŸ’€

  • 1,3) β€” noexcept specification: noexcept. So these two are literally promising not to throw. 🫢
  • 2) β€” Throws filesystem_error if an error occurs. The exception object is constructed with p as an argument. So yeah, if it’s gonna yell, it yells with p in the mix. 😭

πŸ¦‹ See also πŸ¦‹

This section is incomplete. πŸ’€ Not me reading an incomplete section β€” it’s giving β€œwe’ll finish this later,” and we respect it. πŸ™ˆ


🌈 Categories 🌈

  • Noindexed pages
  • unconditionally noexcept
  • Todo without reason

🧚 Hidden categories 🧚

  • Pages with unreviewed unconditional noexcept template
  • Pages with unreviewed noexcept template

okay that’s the whole page, bestie. source: http://cppreference.com β€’ date: 2024.06.10 β€” mwah, bye! πŸ’œβœ¨

πŸ“¦ where this page comes from