convenient generic_u8string(path) as workaround Boost not having path.generic_u8string()
- a good point for http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0251r0.pdf
This commit is contained in:
parent
16f835e083
commit
5f947d5ec8
@ -34,6 +34,16 @@ namespace filesystem_ext
|
|||||||
|
|
||||||
std::experimental::filesystem::path path_user(); ///< extention ?
|
std::experimental::filesystem::path path_user(); ///< extention ?
|
||||||
|
|
||||||
|
/// workaround Boost not having path.generic_u8string() - a good point for http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0251r0.pdf
|
||||||
|
inline std::string generic_u8string(const std::experimental::filesystem::path& p)
|
||||||
|
{
|
||||||
|
#if NANA_USING_BOOST_FILESYSTEM
|
||||||
|
return nana::to_utf8(p.generic_wstring());
|
||||||
|
#else
|
||||||
|
return p.generic_u8string();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
inline bool is_directory(const std::experimental::filesystem::directory_entry& dir) noexcept
|
inline bool is_directory(const std::experimental::filesystem::directory_entry& dir) noexcept
|
||||||
{
|
{
|
||||||
return is_directory(dir.status());
|
return is_directory(dir.status());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user