clang-format, and fix a leftover

This commit is contained in:
Nicole Mazzuca 2019-08-10 11:57:15 -07:00 committed by nicole mazzuca
parent a6ae888f4e
commit 420dbffaa0

View File

@ -54,22 +54,15 @@ namespace fs
using stdfs::file_type; using stdfs::file_type;
// to set up ADL correctly on `file_status` objects, we are defining // to set up ADL correctly on `file_status` objects, we are defining
// this in our own namespace // this in our own namespace
struct file_status : private stdfs::file_status { struct file_status : private stdfs::file_status
{
using stdfs::file_status::file_status; using stdfs::file_status::file_status;
using stdfs::file_status::type;
using stdfs::file_status::permissions; using stdfs::file_status::permissions;
using stdfs::file_status::type;
}; };
#endif #endif
/*
std::experimental::filesystem's file_status and file_type are broken in
the presence of symlinks -- a symlink is treated as the object it points
to for `symlink_status` and `symlink_type`
*/
#if 0
#endif
inline bool is_symlink(file_status s) noexcept inline bool is_symlink(file_status s) noexcept
{ {
#if defined(_WIN32) #if defined(_WIN32)
@ -77,18 +70,9 @@ namespace fs
#endif #endif
return s.type() == file_type::symlink; return s.type() == file_type::symlink;
} }
inline bool is_regular_file(file_status s) inline bool is_regular_file(file_status s) { return s.type() == file_type::regular; }
{ inline bool is_directory(file_status s) { return s.type() == file_type::directory; }
return s.type() == file_type::regular; inline bool exists(file_status s) { return s.type() != file_type::not_found && s.type() != file_type::none; }
}
inline bool is_directory(file_status s)
{
return s.type() == file_type::directory;
}
inline bool exists(file_status s)
{
return s.type() != file_type::not_found && s.type() != file_type::none;
}
} }
/* /*