W3cubDocs

/C++

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

bool operator==( const directory_entry& rhs ) const;
(1) (since C++17)
bool operator!=( const directory_entry& rhs ) const;
(2) (since C++17)
bool operator<( const directory_entry& rhs ) const;
(3) (since C++17)
bool operator<=( const directory_entry& rhs ) const;
(4) (since C++17)
bool operator>( const directory_entry& rhs ) const;
(5) (since C++17)
bool operator>=( const directory_entry& rhs ) const;
(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.

Exceptions

noexcept specification:
noexcept

See also

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

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/filesystem/directory_entry/operator_cmp