mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-14 09:25:30 -04:00
File: Add misc useful API from C++17.
This commit is contained in:
parent
b9e475cbf4
commit
86f672af2b
2 changed files with 14 additions and 0 deletions
|
@ -251,6 +251,10 @@ path& path::replace_extension(const path& replacement) {
|
|||
return *this;
|
||||
}
|
||||
|
||||
bool operator<(const path& lhs, const path& rhs) {
|
||||
return lhs.native() < rhs.native();
|
||||
}
|
||||
|
||||
bool operator>(const path& lhs, const path& rhs) {
|
||||
return lhs.native() > rhs.native();
|
||||
}
|
||||
|
@ -276,6 +280,10 @@ directory_iterator& directory_iterator::operator++() {
|
|||
return *this;
|
||||
}
|
||||
|
||||
bool is_directory(const file_status s) {
|
||||
return (s & AM_DIR);
|
||||
}
|
||||
|
||||
bool is_regular_file(const file_status s) {
|
||||
return !(s & AM_DIR);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue