ghcFilesystem::ghc_filesystem
is now set unconditionallystem()
, filename()
and extension()
of fs::path
would return wrong result if a colon was in the filenamefs::last_write_time(path, time, ec)
setter on iOS, tvOS and watchOSfs::directory_entry::refresh()
now, consistently with status()
will not throw on symlinks to non-existing targets, but make the entry have file_type::not_found
as the typeEINTR
on POSIX directory iteration and file copy to avoid errors on network filesystemsfs::copy_file()
now also copies the permissionsfs::copy_file()
ignoring the skip_existing
option.Thank you to all the reporters of issues and contributors of PRs!
Published by gulrak over 2 years ago
GHC_NO_DIRENT_D_TYPE
on systems that don't support dirent::d_type
and fixed build configuration and tests to support Solaris as new platform.PATH_MAX
, one is defined.Published by gulrak almost 3 years ago
fs::remove_all
now just deletes symbolic links instead of following them.fs::space
where a numerical overflow could happen in a multiplication.Published by gulrak over 3 years ago
fs::create_directories
on Windows no longer breaks on long filenames.Published by gulrak over 3 years ago
ghc::filesystem
treated mounted folder/volumes erroneously as symlinks, leading fs::canonical
to fail on paths containing those.recursive_directory_iterator
will not try to enter dead symlinks.fs::remove
failed when the path pointed to a read-only entry, see also (microsoft/STL#1511) for the corresponding issue in std::fs
on windows.GHC_NO_DIRENT_D_TYPE
allows os detection to support systems without the dirent.d_type
member, experimental first QNX compile support as initial use case, fixed issue with filesystems returning DT_UNKNOWN
(e.g. reiserfs).string_view
support when clang with libstdc++ is detected.<Availability.h>
was included before <ghc/fs_std.hpp>
or <ghc/fs_std_fwd.hpp>
/<ghc/fs_std_impl.hpp>
.std::filesystem
features are supported, and was replaced by the tag-like chapter names that stay (mostly) consistent over the versions.Published by gulrak over 3 years ago
recursive_directory_iterator
over large trees now somewhere between libc++ and libstdc++.ghc::filesystem
now has preliminary support for Cygwin. Changes where made to allow the tests to compile and run successfully (tested with GCCGHC_FILESYSTEM_BUILD_STD_TESTING
to override additional build of std::filesystem
versions of the tests for comparison and the possibility to use GHC_FILESYSTEM_TEST_COMPILE_FEATURES
to prefill the used compile features defaulting to CMAKE_CXX_COMPILE_FEATURES
when not given.Published by gulrak over 3 years ago
directory_entry
creation leads to about 20%-25% in tests with recursive_directory_iterator
over a larger directory tree.wchar_t
was not in the list of supported char types on non-Windows backends.string_view
support makes use of <string_view>
or <experiemental/string_view>
when available, and allows use of custom basic_string_view
implementation when defining GHC_HAS_CUSTOM_STRING_VIEW
and importing the string view into the ghc::filesystem
namespace before including filesystem header.std::filesystem
tests now link with -lrt
to avoid issues.fs::hard_link_count
failed due to the filesystems behavior, the test case was adapted to take that into account.GHC_FS_API
and GHC_FS_API_CLASS
are now honored when when set from outside to allow override of behavior.make install
files.Published by gulrak over 3 years ago
GHC_FILESYSTEM_BUILD_TESTING
, GHC_FILESYSTEM_BUILD_EXAMPLES
and GHC_FILESYSTEM_WITH_INSTALL
where implemented, prohibited setting them from a parent project when using this via add_subdirectory
, this fix allows to set them again.fs::path
was originally created from the POSIX based implementation was, by adaption of the incoming and outgoing strings. This resulted in a mutable cache inside fs::path
on Windows, that was inherently not thread-safe, even for const
methods.path
code to now store native path-representation. This changed a lot of code, but when combined with wchar_t
as value_type
helped to avoid lots of conversion for calls to Win-API.fs::path::native()
and fs::path::c_str()
can now be noexcept
as the standard mandateswchar_t
is now the default for fs::path::value_type
and std::wstring
is the default für fs::path::string_type
.const
methods of fs::path
is no longer an issueGHC_WIN_DISABLE_AUTO_PREFIXES
, for all other types of prefixes or namespaces the behavior follows that of MSVC std::filesystem::path
char
/std::string
based approach for Windows is still needed, it can be activated with GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE
fs::file_status
now supports operator==
introduced in std::filesystem
with C++20.fs::path::parent_path()
had a performance issue, as it was still using a loop based approach to recreate the parent from elements. This created lots of temporaries and was too slow especially on long paths.Published by gulrak almost 4 years ago
char8_t
and std::u8string
are supported where Source
is the parameter typefs::path::u8string()
and fs::path::generic_u8string()
now return a std::u8string
<=>
is now supported for fs::path
GHC_FILESYSTEM_ENFORCE_CPP17_API
ghc::filesystem
will fall back to the old fs::path::u8string()
and fs::path::generic_u8string()
API if preferredfs::proximate(p, ec)
where the internal call to fs::current_path()
was not using the error_code
variant, throwing possible exceptions instead of setting ec
.LWG_2936_BEHAVIOUR
is now on by default.Published by gulrak almost 4 years ago
Published by gulrak almost 4 years ago
__MAC_OS_X_VERSION_MIN_REQUIRED
to ensure that std::filesystem
is only selected on macOS if the deployment target is at least Catalina.directory_iterator
and the recursive_directory_iterator
had an issue with the skip_permission_denied
option, that leads to the inability to skip SIP protected folders on macOS._MSVC_LANG
is now used when available, additionally to __cplusplus
, in the helping headers to allow them to work even when /Zc:__cplusplus
is not used.false
on fs::exists
or not-found-errors on fs::status
. Namespaced paths are not filtered anymore.Published by gulrak about 4 years ago
TestAllocator
in filesystem_test.cpp
was completed to fulfill the requirements to build on CentOS 7 with devtoolset-9
. CentOS 7 and CentOS 8 are now part of the CI builds.LWG_2936_BEHAVIOUR
that allows to enable post C++17 fs::path::compare
behaviour, where the comparison is as if it was an element wise path comparison as described in LWG 2936 and C++20 [fs.path.compare]
. It is default off in v1.3.6 and will be default starting from v1.4.0 as it changes ordering.Published by gulrak about 4 years ago
wchar_t
versions of std::fstream
from ghc::filesystem::fstream
wrappers on Windows if using GCC with libc++.fs::directory_options::skip_permission_denied
and initial support for compilation with emscripten.ghc::filesystem
now supports use in projects with disabled exceptions. API signatures using exceptions for error handling are not available in this mode, thanks for the PR (this resolves #60 and #43)Published by gulrak over 4 years ago
ERROR_FILE_TOO_LARGE
constant.fs::lexically_relative
didn't ignore trailing slash on the base parameter, thanks for PR #57.fs::create_directories
returned true
when nothing needed to be created, because the directory already existed.error_code
was not reset, if cached result was returned.fs::path
from a stream.timespec
fields to avoid warnings.GHC_OS_*
target defines for BSD and SYS5R4 systems.Published by gulrak over 4 years ago
Published by gulrak almost 5 years ago
fs::rename
on Windows didn't replace an axisting regular file as required by the standard, but gave an error. New tests and a fix as provided in the issue was implemented.fs_fwd.hpp
or fs_std_fwd.hpp
der was a use of DWORD
in the forwarding part leading to an error if Windows.h
was notDWORD
was removed.GetProcAddress
gave a warning with -Wcast-function-type
on MSYS2 and MinGW GCC 9 builds.Published by gulrak almost 5 years ago
CMakeLists.txt
will automatically exclude building examples and tests when used as submodule, the configuration options now use a prefixed name toghcFilesystemConfig.cmake
in ${CMAKE_INSTALL_LIBDIR}/cmake/ghcFilesystem
for find_package
thatghcFilesystem::ghc_filesystem
.error: redundant redeclaration of 'constexpr' static data member
deprecation warning in C++17 mode.fs::create_directories
, thanks for the PR!GHC_FILESYSTEM_WITH_INSTALL
that is defaulted to OFF if ghc::filesystem
is used via add_subdirectory
.fs::path::lexically_normal()
that leaves a trailing separator in case of a resulting path ending with ..
as last element.Published by gulrak about 5 years ago
BUILD_TESTING
and BUILD_EXAMPLES
to NO
, OFF
or FALSE
.std::string_view
when available was added.std::string_view
is available.fs::path::preferred_seperator
declaration was not compiling on pre C++17 compilers and no test accessed it, to show the problem. Fixed it to an construction C++11 compiler should accept and added a test that is successful on all combinations tested.Published by gulrak about 5 years ago
fs::copy_options
where not forwarded from fs::copy
to fs::copy_file
in one of the cases.Published by gulrak over 5 years ago
strerror_r
signature was expected. The complex preprocessor define mix was dropped in favor of the usual dispatch by overloading a unifying wrapper.