Auto-linking can still be useful to users of MSVC and compatible
compilers on Windows, when the user links against static build of
Boost.Filesystem. This feature is marked deprecated though, so
it can be removed in the future, when the generated CMake config
files include information about third-party dependencies of Boost
libraries.
Additionally, restored support for linking against Windows CE-cpecific
coredll library. This platform is not tested though and therefore not
properly supported.
Closes https://github.com/boostorg/filesystem/issues/156.
The updated description refers to absolute operation instead of
complete, which was deprecated and no longer documented in the
reference section. Also, removed a broken link to non-existing
not in the complete docs.
Closes https://github.com/boostorg/filesystem/pull/154.
The operation would use (symlink_)status internally to test if the target
file or directory exists. That operation can return an error code even if
it completes successfully. However, copy operation would abort in this case
before attempting to copy anything. This would not be caught by tests because
the tests use the overloads without an error code, and an exception is not
thrown by (symlink_)status in this case.
The fix is to test the returned file status and return if it indicates error.
Also, avoid using the external error code to receive error code from
(symlink_)status to keep it clean if copy operation succeeds.
A similar problem has been fixed in Windows implementation of space operation.
Fixes https://github.com/boostorg/filesystem/issues/152.
windows_file_codecvt is not exported from Boost.Filesystem and is
only used internally. It needs to be visible, where it matters
(which, given that this component is Windows-specific, is probably
nowhere).
This should fix readdir(_r) on 32-bit systems, which was not 64-bit after
commit c758552338 because _FILE_OFFSET_BITS=64
was not defined in directory.cpp. Also, there were filesystem-related system
calls in unique_path.cpp, where the macro was not defined either. Including
the platform header in all source files is useful for possible future changes
that may require the platform-specific macros.
Closes https://github.com/boostorg/filesystem/pull/150.
The check depends on Boost.Predef and Boost.WinAPI. Unfortunately,
we cannot use their CMake targets in check_cxx_source_compiles because
they may not yet be defined at the point of inclusion of
filesystem/CMakeLists.txt by the superproject. Thus we have to manually
specify include path to the monolithic include tree. And bcrypt library.
We intentionally do not specify include paths for Boost.Predef and
Boost.WinAPI because that would require to also specify paths of their
dependencies, and this is not an acceptable maintenance burden.
Use the common functions for indicating failure.
In POSIX version, check for EINTR error code when reading from
/dev/(u)random and return the appropriate error code.
On Windows, use the proper type for error code. Also, include
winapi/config.hpp to let Boost.WinAPI define targer Windows version
macros.
Use unsigned types for sizes and indexes.
This fixes a problem that is_symlink(directory_entry) always returns
false, even if directory_entry is indeed a symlink. This change makes
is_symlink(directory_entry) behave the same as is_symlink(path) and
use symlink_status().
WASI is a POSIX-like platform that has a few important differences:
* There is no concept of a mutable current directory.
* There is no concept of a file mode, and no `chmod` call.
* There is no concept of a filesystem, and no `statfs` call.
* There is no `readdir_r` call because there are no threads.
Instead of enabling/disabling the test compilation, define a macro when
mklink shell command is detected to be available. Test this macro
in all tests that use this command to create junctions and symlinks
on Windows.
Also, renamed reparce_tag_file_placeholder.cpp test to fix a spelling
error.
When the source path is not absolute and copy_options::create_symlinks is
specified, deduce the relative path from the target location to the source
file to create a symlink. This allows to copy to a path that is not the current
path.
Also, added absolute overloads taking error_code argyment.
Also, when current_path() is used as a default argument to other operations,
and the operation also accepts error_code, use current_path(ec) to report
errors through the error code rather than throwing an exception.
Also, added a test for copy operation.
The updated copy implementation follows C++20 [fs.op.copy] definition
and implements additional copy options.
The new create_directory overloads accepting two paths are functionally
similar to copy_directory, but are compliant with C++20
[fs.op.create.directory]. The copy_directory operation has been deprecated
in favor of create_directory.