mirror of
https://github.com/boostorg/filesystem.git
synced 2026-01-19 04:12:09 +00:00
7403ffca00b788c978d2de11c5148f5fa58555de
Windows 10 1709 and later support POSIX semantics for removing files, which means the file name is removed from the filesystem namespace as soon as the file is marked for deletion. This makes opening the file afterwards impossible, and allows creating a new file with the same name, even if the deleted file is still open and in use. The implementation uses runtime detection of the feature in the OS. We are also using two more implementations for file removal: one that employs the more recent FILE_DISPOSITION_FLAG_IGNORE_READONLY_ATTRIBUTE flag (available since Windows 10 1809), and FILE_DISPOSITION_INFO structure (supported since Windows Vista). The former allows to optimize removal of read-only files, and the latter allows to make file deletion atomic (i.e. not prone to failure if the file is replaced on the filesystem while the operation is executing). The implementation is chosen in runtime, depending on which one succeeds removing a file. Also, added support for deleting read-only directories, in addition to non-directory files, and simplified code a little. Closes https://github.com/boostorg/filesystem/issues/216.
Boost.Filesystem
Boost.Filesystem, part of collection of the Boost C++ Libraries, provides facilities to manipulate files and directories, and the paths that identify them.
Directories
- doc - Documentation sources
- include - Interface headers of Boost.Filesystem
- src - Compilable source files of Boost.Filesystem
- test - Boost.Filesystem unit tests
- example - Boost.Filesystem usage examples
More information
- Documentation
- Report bugs. Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
- Submit your patches as pull requests against develop branch. Note that by submitting patches you agree to license your modifications under the Boost Software License, Version 1.0.
Build status
| Branch | GitHub Actions | AppVeyor | Test Matrix | Dependencies |
|---|---|---|---|---|
master |
||||
develop |
License
Distributed under the Boost Software License, Version 1.0.
Description
Languages
C++
98.4%
CMake
1.5%