mirror of
https://github.com/boostorg/filesystem.git
synced 2026-02-23 03:32:18 +00:00
Add class path constexpr constants separator and dot of the type appropriate for the platform, and add class path member query functions filename_is_dot() and filename_is_dot_dot(). These add convenience and the implementations may be more efficient that user coded equivalent functions. Also add detail functions is_directory_separator() and is_element_separator(), and replace all uses of local is_separator() in path.cpp with detail::is_directory_separator().
This commit is contained in:
@@ -937,12 +937,9 @@ namespace detail
|
||||
BOOST_FILESYSTEM_DECL
|
||||
bool create_directories(const path& p, system::error_code* ec)
|
||||
{
|
||||
path filename(p.filename());
|
||||
if ((filename.native().size() == 1 && filename.native()[0] == dot)
|
||||
|| (filename.native().size() == 2
|
||||
&& filename.native()[0] == dot && filename.native()[1] == dot))
|
||||
if (p.filename_is_dot() || p.filename_is_dot_dot())
|
||||
return create_directories(p.parent_path(), ec);
|
||||
|
||||
|
||||
error_code local_ec;
|
||||
file_status p_status = status(p, local_ec);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user