fix nana filesystem
This commit is contained in:
parent
240fb82ab3
commit
bf27549beb
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* A ISO C++ filesystem Implementation
|
* A ISO C++ filesystem Implementation
|
||||||
* Nana C++ Library(http://www.nanapro.org)
|
* Nana C++ Library(http://www.nanapro.org)
|
||||||
* Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com)
|
* Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com)
|
||||||
*
|
*
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -434,8 +434,7 @@ namespace nana { namespace experimental { namespace filesystem
|
|||||||
{ return s.type() == file_type::directory ;}
|
{ return s.type() == file_type::directory ;}
|
||||||
|
|
||||||
bool is_directory(const path& p);
|
bool is_directory(const path& p);
|
||||||
|
bool is_directory(const path& p, std::error_code& ec) noexcept;
|
||||||
//bool is_directory(const path& p, error_code& ec) noexcept;
|
|
||||||
|
|
||||||
inline bool is_regular_file(file_status s) noexcept
|
inline bool is_regular_file(file_status s) noexcept
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* A ISO C++ FileSystem Implementation
|
* A ISO C++ FileSystem Implementation
|
||||||
* Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com)
|
* Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com)
|
||||||
*
|
*
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -995,6 +995,11 @@ namespace nana { namespace experimental { namespace filesystem
|
|||||||
return (status(p).type() == file_type::directory);
|
return (status(p).type() == file_type::directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool is_directory(const path& p, std::error_code& ec) noexcept
|
||||||
|
{
|
||||||
|
return (status(p, ec).type() == file_type::directory);
|
||||||
|
}
|
||||||
|
|
||||||
std::uintmax_t file_size(const path& p)
|
std::uintmax_t file_size(const path& p)
|
||||||
{
|
{
|
||||||
#if defined(NANA_WINDOWS)
|
#if defined(NANA_WINDOWS)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Color Schemes
|
* Color Schemes
|
||||||
* Nana C++ Library(http://www.nanapro.org)
|
* Nana C++ Library(http://www.nanapro.org)
|
||||||
* Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com)
|
* Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com)
|
||||||
*
|
*
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -80,14 +80,14 @@ namespace nana
|
|||||||
|
|
||||||
color color_proxy::get(const color& default_color) const
|
color color_proxy::get(const color& default_color) const
|
||||||
{
|
{
|
||||||
if (color_->invisible())
|
if (color_ && !color_->invisible())
|
||||||
return default_color;
|
return *color_;
|
||||||
return *color_;
|
return default_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
color_proxy::operator color() const
|
color_proxy::operator color() const
|
||||||
{
|
{
|
||||||
return *color_;
|
return (color_ ? *color_ : color{});
|
||||||
}
|
}
|
||||||
//end class color_proxy
|
//end class color_proxy
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user