mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-06-04 11:13:58 +08:00
Renamed filesystem.h to filesystem.hpp
This commit is contained in:
parent
3338d968ea
commit
78ddb7aed7
@ -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 <filesystem>
|
||||
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
|
||||
|
@ -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()
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <filesystem>
|
||||
namespace fs = std::filesystem;
|
||||
#else
|
||||
#include "../filesystem.h"
|
||||
#include "../filesystem.hpp"
|
||||
namespace fs = ghc::filesystem;
|
||||
#endif
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
// #include <filesystem>
|
||||
// namespace fs = std::filesystem;
|
||||
// #else
|
||||
// #include "filesystem.h"
|
||||
// #include "filesystem.hpp"
|
||||
// namespace fs = ghc::filesystem;
|
||||
// #endif
|
||||
//
|
@ -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
|
||||
$<$<CXX_COMPILER_ID:Clang>:-Wall -Wextra -Werror>
|
||||
$<$<CXX_COMPILER_ID:GNU>:-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 "$<$<CONFIG:DEBUG>:--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)
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user