SysTutorials

Linux Manual Pages › Section 3

stdfilesystemdirectory_entryoperator(3)

std::filesystem::directory_entry::operator==,!=,<,<=,>,>= – std::filesystem::directory_entry::operator==,!=,<,<=,>,>=

Synopsis

bool operator==( const directory_entry& rhs ) const noexcept; (1) (since C++17)
bool operator!=( const directory_entry& rhs ) const noexcept; (2) (since C++17)
bool operator<( const directory_entry& rhs ) const noexcept; (3) (since C++17)
bool operator<=( const directory_entry& rhs ) const noexcept; (4) (since C++17)
bool operator>( const directory_entry& rhs ) const noexcept; (5) (since C++17)
bool operator>=( const directory_entry& rhs ) const noexcept; (6) (since C++17)
Compares the path with the directory entry rhs.

Parameters

rhs – directory_entry to compare

Return value

1) true if path() == rhs.path(), false otherwise.
2) true if path() != rhs.path(), false otherwise.
3) true if path() < rhs.path(), false otherwise.
4) true if path() <= rhs.path(), false otherwise.
5) true if path() > rhs.path(), false otherwise.
6) true if path() >= rhs.path(), false otherwise.

See also

                     returns the path the entry refers to
path (public member function)
operator_const_path&