Lines Matching full:filesystem

3 …ild Status](https://travis-ci.org/gulrak/filesystem.svg?branch=master)](https://travis-ci.org/gulr…
4 …status/t07wp3k2cddo0hpo/branch/master?svg=true)](https://ci.appveyor.com/project/gulrak/filesystem)
5 …tps://api.cirrus-ci.com/github/gulrak/filesystem.svg?branch=master)](https://cirrus-ci.com/github/…
6 …cloud.drone.io/api/badges/gulrak/filesystem/status.svg?ref=refs/heads/master)](https://cloud.drone…
7 …//coveralls.io/repos/github/gulrak/filesystem/badge.svg?branch=master)](https://coveralls.io/githu…
8 …ase Tag](https://img.shields.io/github/tag/gulrak/filesystem.svg)](https://github.com/gulrak/files…
10 # Filesystem chapter
12 This is a header-only single-file std::filesystem compatible helper library,
17 C++11 compatible compiler. It is of course in its own namespace `ghc::filesystem`
18 to not interfere with a regular `std::filesystem` should you use it in a mixed C++17
30 I'm often in need of filesystem functionality, mostly `fs::path`, but directory
41 It is from after the standardization of C++17 but it contains the latest filesystem
55 `ghc::filesystem` is developed on macOS but tested on Windows and Linux.
61 supported platform yet. All in all, I don't see it replacing `std::filesystem`
63 `std::filesystem`, just a drop-in if you can't use it (with the exception
98 `std::filesystem` implementation, named `std_filesystem_test`
100 succeed with all filesystem implementations, but in reality, there are
109 The latest release version is [v1.3.2](https://github.com/gulrak/filesystem/tree/v1.3.2) and
110 source archives can be found [here](https://github.com/gulrak/filesystem/releases/tag/v1.3.2).
114 As `ghc::filesystem` is at first a header-only library, it should be enough to copy the header
116 simply include the `filesystem.hpp` header (or `ghc/filesystem.hpp` if you use the subdirectory).
118 Everything is in the namespace `ghc::filesystem`, so one way to use it only as
123 #if __has_include(<filesystem>)
125 #include <filesystem>
126 namespace fs = std::filesystem;
130 #include <ghc/filesystem.hpp>
131 namespace fs = ghc::filesystem;
147 #if __has_include(<filesystem>)
149 #include <filesystem>
151 using namespace std::filesystem;
159 #include <ghc/filesystem.hpp>
161 using namespace ghc::filesystem;
162 using ifstream = ghc::filesystem::ifstream;
163 using ofstream = ghc::filesystem::ofstream;
164 using fstream = ghc::filesystem::fstream;
176 dynamic selection of a filesystem implementation, that you can include
177 instead of `ghc/filesystem.hpp` when you want std::filesystem where
178 available and ghc::filesystem where not. It also enables the `wchar_t`
179 support on `ghc::filesystem` on Windows, so the resulting implementation
185 Alternatively, starting from v1.1.0 `ghc::filesystem` can also be used by
202 #if __has_include(<filesystem>)
204 #include <filesystem>
206 using namespace std::filesystem;
216 using namespace ghc::filesystem;
217 using ifstream = ghc::filesystem::ifstream;
218 using ofstream = ghc::filesystem::ofstream;
219 using fstream = ghc::filesystem::fstream;
229 #if __has_include(<filesystem>))
237 if you want to dynamically select the filesystem implementation. they also
238 enable the `wchar_t` support on `ghc::filesystem` on Windows, so the resulting
245 Starting from v1.1.0, it is possible to add `ghc::filesystem`
248 to ensure correct include path that allow `#include <ghc/filesystem.hpp>`
273 There is almost no documentation in this release, as any `std::filesystem`
275 section. So you might head over to https://en.cppreference.com/w/cpp/filesystem
281 ### `ghc::filesystem::ifstream`, `ghc::filesystem::ofstream`, `ghc::filesystem::fstream`
284 They simply add an `open()` method and a constuctor with an `ghc::filesystem::path`
287 ### `ghc::filesystem::u8arguments`
302 namespace fs = ghc::filesystem;
357 // methods in ghc::filesystem::path:
366 ghc::filesystem under C++17.
372 filesystem::path::string_type
373 filesystem::path::value_type
385 Starting with v1.2.0 `ghc::filesystem` has the option to select the more
412 #### fs.path ([ref](https://en.cppreference.com/w/cpp/filesystem/path))
424 will show as warnings under std::filesystem. This leads to a change in the
440 #### fs.op.copy ([ref](https://en.cppreference.com/w/cpp/filesystem/copy))
442 Then there is `fs::copy`. The tests in the suite fail partially with C++17 `std::filesystem`
480 bit mask used in the interface of C++17 filesystem. The permissions returned
490 ### [v1.3.2](https://github.com/gulrak/filesystem/releases/tag/v1.3.2)
492 * Bugfix for [#58](https://github.com/gulrak/filesystem/issues/58), on MinGW the
495 * Bugfix for [#56](https://github.com/gulrak/filesystem/issues/58), `fs::lexically_relative`
497 [#57](https://github.com/gulrak/filesystem/pull/57).
498 * Bugfix for [#55](https://github.com/gulrak/filesystem/issues/55), `fs::create_directories`
500 * Bugfix for [#54](https://github.com/gulrak/filesystem/issues/54), `error_code`
502 * Pull request [#53](https://github.com/gulrak/filesystem/pull/53), fix for wrong
504 * Pull request [#52](https://github.com/gulrak/filesystem/pull/52), an ARM Linux
506 * Pull request [#51](https://github.com/gulrak/filesystem/pull/51), FreeBSD is now
508 * Pull request [#50](https://github.com/gulrak/filesystem/pull/50), adaptive cast to
511 ### [v1.3.0](https://github.com/gulrak/filesystem/releases/tag/v1.3.0)
513 * **Important: `ghc::filesystem` is re-licensed from BSD-3-Clause to MIT license.** (see
514 [#47](https://github.com/gulrak/filesystem/issues/47))
515 * Pull request [#46](https://github.com/gulrak/filesystem/pull/46), suppresses
517 * Bugfix for [#44](https://github.com/gulrak/filesystem/issues/44), fixes
520 ### [v1.2.10](https://github.com/gulrak/filesystem/releases/tag/v1.2.10)
524 * Bugfix for [#41](https://github.com/gulrak/filesystem/issues/41), `fs::rename`
527 * Bugfix for [#39](https://github.com/gulrak/filesystem/issues/39), for the
532 * Bugfix for [#38](https://github.com/gulrak/filesystem/issues/38), casting the
536 ### [v1.2.8](https://github.com/gulrak/filesystem/releases/tag/v1.2.8)
538 * Pull request [#30](https://github.com/gulrak/filesystem/pull/30), the
542 * Pull request [#24](https://github.com/gulrak/filesystem/pull/24), install
546 * Pull request [#31](https://github.com/gulrak/filesystem/pull/31), fixes
549 * Pull request [#32](https://github.com/gulrak/filesystem/pull/32), fixes
551 * Pull request [#34](https://github.com/gulrak/filesystem/pull/34), fixes
554 * Feature [#35](https://github.com/gulrak/filesystem/issues/35), new CMake
556 defaulted to OFF if `ghc::filesystem` is used via `add_subdirectory`.
557 * Bugfix for [#33](https://github.com/gulrak/filesystem/issues/33), fixes
560 * Bugfix for [#36](https://github.com/gulrak/filesystem/issues/36), warings
563 ### [v1.2.6](https://github.com/gulrak/filesystem/releases/tag/v1.2.6)
565 * Pull request [#23](https://github.com/gulrak/filesystem/pull/23), tests and
568 * Pull request [#25](https://github.com/gulrak/filesystem/pull/25),
572 * Bugfix for [#27](https://github.com/gulrak/filesystem/issues/27), the
577 * Bugfix for [#29](https://github.com/gulrak/filesystem/issues/29), stricter
580 ### [v1.2.4](https://github.com/gulrak/filesystem/releases/tag/v1.2.4)
586 ### [v1.2.2](https://github.com/gulrak/filesystem/releases/tag/v1.2.2)
588 * Fix for ([#21](https://github.com/gulrak/filesystem/pull/21)), when compiling
593 ### [v1.2.0](https://github.com/gulrak/filesystem/releases/tag/v1.2.0)
597 * Pull request ([#13](https://github.com/gulrak/filesystem/pull/13)), set
599 * Pull request ([#14](https://github.com/gulrak/filesystem/pull/14)), added
601 * Bugfix for ([#15](https://github.com/gulrak/filesystem/issues/15)), the
602 forward/impl way of using `ghc::filesystem` missed a `<vector>` include
604 * Bugfix for ([#16](https://github.com/gulrak/filesystem/issues/16)),
607 * New feature ([#17](https://github.com/gulrak/filesystem/issues/17)), optional
611 * New feature ([#18](https://github.com/gulrak/filesystem/issues/18)), optional
612 filesystem exceptions/errors on unicode errors with defined
615 * Pull request ([#20](https://github.com/gulrak/filesystem/pull/20)), fix for
619 ### [v1.1.4](https://github.com/gulrak/filesystem/releases/tag/v1.1.4)
621 * Additional Bugfix for ([#12](https://github.com/gulrak/filesystem/issues/12)),
625 * Fix for crashing unit tests against MSVC C++17 std::filesystem
629 ### [v1.1.2](https://github.com/gulrak/filesystem/releases/tag/v1.1.2)
631 * Bugfix for ([#11](https://github.com/gulrak/filesystem/issues/11)),
633 * Bugfix for ([#12](https://github.com/gulrak/filesystem/issues/12)),
638 C++17 std::filesystem builds of tests and examples for interoperability
648 ### [v1.1.0](https://github.com/gulrak/filesystem/releases/tag/v1.1.0)
652 `include/ghc/` to be able to include by `<ghc/filesystem.hpp>` as the
655 * Better CMake support: `ghc::filesystem` now can be used as a submodul
658 is needed and the include directories will be set so `#include <ghc/filesystem.hpp>`
662 * Enhancement ([#10](https://github.com/gulrak/filesystem/issues/10)),
665 `ghc::filesystem` declarations (`fs_fwd.hpp`) and to wrap the
673 ### [v1.0.10](https://github.com/gulrak/filesystem/releases/tag/v1.0.10)
675 * Bugfix for ([#9](https://github.com/gulrak/filesystem/issues/9)), added
676 missing return statement to `ghc::filesystem::path::generic_string()`
679 * `filesystem.h` was renamed `filesystem.hpp` to better reflect that it is
682 ### [v1.0.8](https://github.com/gulrak/filesystem/releases/tag/v1.0.8)
684 * Bugfix for ([#6](https://github.com/gulrak/filesystem/issues/6)), where
685 `ghc::filesystem::remove()` and `ghc::filesystem::remove_all()` both are
688 * Merged pull request ([#7](https://github.com/gulrak/filesystem/pull/7)),
690 `ghc::filesystem::remove()` under Windows.
691 * Bugfix for (([#8](https://github.com/gulrak/filesystem/issues/8)), the
692 Windows version of `ghc::filesystem::directory_iterator` now releases
696 ### [v1.0.6](https://github.com/gulrak/filesystem/releases/tag/v1.0.6)
698 * Bugfix for ([#4](https://github.com/gulrak/filesystem/issues/4)), missing error_code
699 propagation in `ghc::filesystem::copy()` and `ghc::filesystem::remove_all` fixed.
700 * Bugfix for ([#5](https://github.com/gulrak/filesystem/issues/5)), added missing std
701 namespace in `ghc::filesystem::recursive_directory_iterator::difference_type`.
703 ### [v1.0.4](https://github.com/gulrak/filesystem/releases/tag/v1.0.4)
705 * Bugfix for ([#3](https://github.com/gulrak/filesystem/issues/3)), fixed missing inlines
709 ### [v1.0.2](https://github.com/gulrak/filesystem/releases/tag/v1.0.2)
712 * Refactored `fs.op.permissions` test to work with all tested `std::filesystem`
714 * Added helper class `ghc::filesystem::u8arguments` as `argv` converter, to
719 tested (and build) with `ghc::filesystem` and C++17 `std::filesystem` when
723 * Tests can now also be run against MS version of std::filesystem for comparison.
729 ### [v1.0.1](https://github.com/gulrak/filesystem/releases/tag/v1.0.1)
731 * Bugfix: `ghc::filesystem::canonical` now sees empty path as non-existant and reports
732 an error. Due to this `ghc::filesystem::weakly_canonical` now returns relative
733 paths for non-existant argument paths. ([#1](https://github.com/gulrak/filesystem/issues/1))
734 * Bugfix: `ghc::filesystem::remove_all` now also counts directories removed ([#2](https://github.co…
736 and dereferencable constraints, leading to fails on `std::filesystem` tests.
742 ### [v1.0.0](https://github.com/gulrak/filesystem/releases/tag/v1.0.0)
745 C++17 std::filesystem, as far as possible without other C++17 dependencies.