std::experi...em::is_other(3)

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

πŸ’… std::experimental::filesystem::is_other πŸ’…

okay bestie, welcome to std::experimental::filesystem::is_other β€” this one's from the C++ Standard Libary manual (yes, that's literally the manual name up top, one-B "Libary" and all, we are not editing the source, periodt). It's a filesystem TS situation, so keep that in mind.


🌸 NAME 🌸

std::experimental::filesystem::is_other β€” checks whether a thing is a file of other type. Like, the file exists, but it's not a regular file, not a directory, and not a symlink. That vibe.


✨ Synopsis ✨

Defined in header <experimental/filesystem>
bool is_other( file_status s );                 (1) (filesystem TS)
bool is_other( const path& p );                 (2) (filesystem TS)
bool is_other( const path& p, error_code& ec ); (3) (filesystem TS)

Checks if the given file status or path corresponds to a file of type other type. That is, the file exists, but is neither regular file, nor directory nor a symlink.

  • 1) β€” Equivalent to exists(s) && !is_regular_file(s) && !is_directory(s) && !is_symlink(s).
  • 2) β€” Equivalent to is_other(status(p)).
  • 3) β€” Equivalent to is_other(status(p, ec)). Returns false and sets ec to an appropriate error code if an error occurs. Otherwise, ec is cleared with a call to ec.clear().

πŸŽ€ Parameters πŸŽ€

  • s β€” file status to check
  • p β€” path to examine
  • ec β€” error code to store the error status to

πŸ¦‹ Return value πŸ¦‹

true if the given path or file status corresponds to a other file, false otherwise. (Yes, "a other file" β€” we're keeping the source's exact phrasing, no cap.)


πŸ”₯ Exceptions πŸ”₯

  • 1,3) β€” noexcept specification: noexcept
  • 2) β€” Throws filesystem_error if an error occurs. The error is constructed with p as an argument. The error code is set to an appropriate error code for the error that caused the failure.

πŸ‘‘ See also πŸ‘‘

This section is incomplete 😭 (that is literally all it says, bestie).


🌈 Categories 🌈

  • Noindexed pages
  • unconditionally noexcept
  • Todo without reason

🧚 Hidden categories 🧚

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

cute sign-off: source/version is http://cppreference.com, date is 2024.06.10, and the page is std::experi...em::is_other(3). mwah πŸ’‹

πŸ“¦ where this page comes from