diff --git a/README.md b/README.md index 4f21f78..0d5029f 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ in the standard, and there might be issues in these implementations too. As it is a header-only library, it should be enough to copy the header into your project folder oder point your include path to this directory and -simply include the `filesystem.h` header. +simply include the `filesystem.hpp` header. Everything is in the namespace `ghc::filesystem`, so one way to use it only as a fallback could be: @@ -97,7 +97,7 @@ a fallback could be: #include namespace fs = std::filesystem; #else -#include "filesystem.h" +#include "filesystem.hpp" namespace fs = ghc::filesystem; #endif ``` @@ -115,7 +115,7 @@ using ofstream = std::ofstream; using fstream = std::fstream; } #else -#include "filesystem.h" +#include "filesystem.hpp" namespace fs { using namespace ghc::filesystem; using ifstream = ghc::filesystem::ifstream; @@ -361,6 +361,8 @@ to the expected behavior. missing return statement to `ghc::filesystem::path::generic_string()` * Added checks to hopefully better compile against Android NDK. There where no tests run yet, so feedback is needed to actually call this supported. +* `filesystem.h` was renamed `filesystem.hpp` to better reflect that it is + a c++ language header. ### [v1.0.8](https://github.com/gulrak/filesystem/releases/tag/v1.0.8) @@ -375,6 +377,7 @@ to the expected behavior. Windows version of `ghc::filesystem::directory_iterator` now releases resources when reaching `end()` like the POSIX one does. + ### [v1.0.6](https://github.com/gulrak/filesystem/releases/tag/v1.0.6) * Bugfix for ([#4](https://github.com/gulrak/filesystem/issues/4)), missing error_code diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index cc0eeeb..5e0b065 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,5 +1,5 @@ -add_executable(fs_dir dir.cpp ../filesystem.h) +add_executable(fs_dir dir.cpp ../filesystem.hpp) if(CMAKE_CXX_COMPILER_ID MATCHES MSVC) target_compile_definitions(fs_dir PRIVATE _CRT_SECURE_NO_WARNINGS) endif() diff --git a/examples/dir.cpp b/examples/dir.cpp index 0b0c03f..df300d0 100644 --- a/examples/dir.cpp +++ b/examples/dir.cpp @@ -6,7 +6,7 @@ #include namespace fs = std::filesystem; #else -#include "../filesystem.h" +#include "../filesystem.hpp" namespace fs = ghc::filesystem; #endif diff --git a/filesystem.h b/filesystem.hpp similarity index 99% rename from filesystem.h rename to filesystem.hpp index d117b3f..2927461 100644 --- a/filesystem.h +++ b/filesystem.hpp @@ -40,7 +40,7 @@ // #include // namespace fs = std::filesystem; // #else -// #include "filesystem.h" +// #include "filesystem.hpp" // namespace fs = ghc::filesystem; // #endif // diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f6742d4..cb3357f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,5 +1,5 @@ -add_executable(filesystem_test filesystem_test.cpp ../filesystem.h catch.hpp) +add_executable(filesystem_test filesystem_test.cpp ../filesystem.hpp catch.hpp) target_compile_options(filesystem_test PRIVATE $<$:-Wall -Wextra -Werror> $<$:-Wall -Werror> @@ -8,7 +8,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES MSVC) target_compile_definitions(filesystem_test PRIVATE _CRT_SECURE_NO_WARNINGS) endif() if(CMAKE_GENERATOR STREQUAL Xcode) - add_executable(filesystem_test_cov filesystem_test.cpp ../filesystem.h catch.hpp) + add_executable(filesystem_test_cov filesystem_test.cpp ../filesystem.hpp catch.hpp) target_compile_options(filesystem_test_cov PRIVATE "$<$:--coverage>") target_link_libraries(filesystem_test_cov PRIVATE --coverage) endif() @@ -18,22 +18,22 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND (CMAKE_CXX_COMPILER_VERSION include_directories(/usr/local/opt/llvm/include) link_directories(/usr/local/opt/llvm/lib) endif() - add_executable(std_filesystem_test filesystem_test.cpp ../filesystem.h catch.hpp) + add_executable(std_filesystem_test filesystem_test.cpp catch.hpp) set_property(TARGET std_filesystem_test PROPERTY CXX_STANDARD 17) target_compile_definitions(std_filesystem_test PRIVATE USE_STD_FS) target_link_libraries(std_filesystem_test -lc++fs) endif() if (CMAKE_COMPILER_IS_GNUCXX AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 8.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)) - add_executable(std_filesystem_test filesystem_test.cpp ../filesystem.h catch.hpp) + add_executable(std_filesystem_test filesystem_test.cpp catch.hpp) set_property(TARGET std_filesystem_test PROPERTY CXX_STANDARD 17) target_compile_definitions(std_filesystem_test PRIVATE USE_STD_FS) target_link_libraries(std_filesystem_test -lstdc++fs) endif() if(CMAKE_CXX_COMPILER_ID MATCHES MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 19.15 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.15)) - add_executable(std_filesystem_test filesystem_test.cpp ../filesystem.h catch.hpp) + add_executable(std_filesystem_test filesystem_test.cpp catch.hpp) set_property(TARGET std_filesystem_test PROPERTY CXX_STANDARD 17) target_compile_options(std_filesystem_test PRIVATE "/Zc:__cplusplus") target_compile_definitions(std_filesystem_test PRIVATE USE_STD_FS _CRT_SECURE_NO_WARNINGS) endif() -add_executable(multifile_test multi1.cpp multi2.cpp ../filesystem.h catch.hpp) +add_executable(multifile_test multi1.cpp multi2.cpp ../filesystem.hpp catch.hpp) diff --git a/test/filesystem_test.cpp b/test/filesystem_test.cpp index 3c70bc3..a951101 100644 --- a/test/filesystem_test.cpp +++ b/test/filesystem_test.cpp @@ -65,7 +65,7 @@ using fstream = std::fstream; #endif #else #define NOMINMAX -#include "../filesystem.h" +#include "../filesystem.hpp" namespace fs { using namespace ghc::filesystem; using ifstream = ghc::filesystem::ifstream; diff --git a/test/multi1.cpp b/test/multi1.cpp index 9aee76b..c4dc1ce 100644 --- a/test/multi1.cpp +++ b/test/multi1.cpp @@ -32,7 +32,7 @@ #define CATCH_CONFIG_MAIN #include "catch.hpp" -#include "../filesystem.h" +#include "../filesystem.hpp" namespace fs = ghc::filesystem; // This test and the one in multi2.cpp doesn't actualy test relevant functionality, diff --git a/test/multi2.cpp b/test/multi2.cpp index 55c8013..f0f9f6e 100644 --- a/test/multi2.cpp +++ b/test/multi2.cpp @@ -30,7 +30,7 @@ // //--------------------------------------------------------------------------------------- #include "catch.hpp" -#include "../filesystem.h" +#include "../filesystem.hpp" namespace fs = ghc::filesystem; // This test and the one in multi1.cpp doesn't actualy test relevant functionality,