From d199de2c80af654e80885202dd72f2c4cbe24729 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 3 Aug 2018 15:44:35 -0700 Subject: [PATCH] Revert "Replace "std::experimental::filesystem" with "std::filesystem" (#1153)" This reverts commit 2a761d635ccfe9f96370ba6b21439687a1c60acd. --- .../CommonLib/GlobalVersionUtility.cpp | 2 +- .../CommonLib/PollingAppOfflineApplication.cpp | 4 ++-- .../CommonLib/PollingAppOfflineApplication.h | 4 ++-- .../CommonLib/hostfxr_utility.cpp | 4 ++-- .../CommonLib/hostfxr_utility.h | 16 ++++++++-------- test/CommonLibTests/FileOutputManagerTests.cpp | 2 +- test/CommonLibTests/GlobalVersionTests.cpp | 2 +- test/CommonLibTests/Helpers.cpp | 4 ++-- test/CommonLibTests/Helpers.h | 4 ++-- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/AspNetCoreModuleV2/CommonLib/GlobalVersionUtility.cpp b/src/AspNetCoreModuleV2/CommonLib/GlobalVersionUtility.cpp index 7cb185b0c3..b2c6b69871 100644 --- a/src/AspNetCoreModuleV2/CommonLib/GlobalVersionUtility.cpp +++ b/src/AspNetCoreModuleV2/CommonLib/GlobalVersionUtility.cpp @@ -6,7 +6,7 @@ #include "GlobalVersionUtility.h" -namespace fs = std::filesystem; +namespace fs = std::experimental::filesystem; // throws runtime error if no request handler versions are installed. // Throw invalid_argument if any argument is null diff --git a/src/AspNetCoreModuleV2/CommonLib/PollingAppOfflineApplication.cpp b/src/AspNetCoreModuleV2/CommonLib/PollingAppOfflineApplication.cpp index 2e552679e0..1468c7ee37 100644 --- a/src/AspNetCoreModuleV2/CommonLib/PollingAppOfflineApplication.cpp +++ b/src/AspNetCoreModuleV2/CommonLib/PollingAppOfflineApplication.cpp @@ -38,7 +38,7 @@ PollingAppOfflineApplication::AppOfflineExists() } -std::filesystem::path PollingAppOfflineApplication::GetAppOfflineLocation(IHttpApplication& pApplication) +std::experimental::filesystem::path PollingAppOfflineApplication::GetAppOfflineLocation(IHttpApplication& pApplication) { - return std::filesystem::path(pApplication.GetApplicationPhysicalPath()) / "app_offline.htm"; + return std::experimental::filesystem::path(pApplication.GetApplicationPhysicalPath()) / "app_offline.htm"; } diff --git a/src/AspNetCoreModuleV2/CommonLib/PollingAppOfflineApplication.h b/src/AspNetCoreModuleV2/CommonLib/PollingAppOfflineApplication.h index 516e72b79f..48e71f6641 100644 --- a/src/AspNetCoreModuleV2/CommonLib/PollingAppOfflineApplication.h +++ b/src/AspNetCoreModuleV2/CommonLib/PollingAppOfflineApplication.h @@ -30,8 +30,8 @@ public: void Stop(bool fServerInitiated) override { UNREFERENCED_PARAMETER(fServerInitiated); } protected: - std::filesystem::path m_appOfflineLocation; - static std::filesystem::path GetAppOfflineLocation(IHttpApplication& pApplication); + std::experimental::filesystem::path m_appOfflineLocation; + static std::experimental::filesystem::path GetAppOfflineLocation(IHttpApplication& pApplication); private: static const int c_appOfflineRefreshIntervalMS = 200; diff --git a/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.cpp b/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.cpp index 57644819be..ab827460bf 100644 --- a/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.cpp +++ b/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.cpp @@ -13,7 +13,7 @@ #include "HandleWrapper.h" #include "Environment.h" -namespace fs = std::filesystem; +namespace fs = std::experimental::filesystem; // // Runs a standalone appliction. @@ -98,7 +98,7 @@ HOSTFXR_UTILITY::GetStandaloneHostfxrParameters( } BOOL -HOSTFXR_UTILITY::IsDotnetExecutable(const std::filesystem::path & dotnetPath) +HOSTFXR_UTILITY::IsDotnetExecutable(const std::experimental::filesystem::path & dotnetPath) { auto name = dotnetPath.filename(); name.replace_extension(""); diff --git a/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.h b/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.h index 9e56fb4e28..1315865803 100644 --- a/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.h +++ b/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.h @@ -44,7 +44,7 @@ public: static BOOL IsDotnetExecutable( - _In_ const std::filesystem::path & dotnetPath + _In_ const std::experimental::filesystem::path & dotnetPath ); static @@ -74,25 +74,25 @@ public: ); static - std::optional + std::optional GetAbsolutePathToHostFxr( - _In_ const std::filesystem::path & dotnetPath, + _In_ const std::experimental::filesystem::path & dotnetPath, _In_ HANDLE hEventLog ); static - std::optional + std::optional GetAbsolutePathToDotnetFromProgramFiles(); static - std::optional + std::optional InvokeWhereToFindDotnet(); static - std::optional + std::optional GetAbsolutePathToDotnet( - _In_ const std::filesystem::path & applicationPath, - _In_ const std::filesystem::path & requestedPath + _In_ const std::experimental::filesystem::path & applicationPath, + _In_ const std::experimental::filesystem::path & requestedPath ); }; diff --git a/test/CommonLibTests/FileOutputManagerTests.cpp b/test/CommonLibTests/FileOutputManagerTests.cpp index ae1085408c..d0caa524a8 100644 --- a/test/CommonLibTests/FileOutputManagerTests.cpp +++ b/test/CommonLibTests/FileOutputManagerTests.cpp @@ -41,7 +41,7 @@ namespace FileOutManagerStartupTests wprintf(expected, out); } - for (auto & p : std::filesystem::directory_iterator(tempDirectory.path())) + for (auto & p : std::experimental::filesystem::directory_iterator(tempDirectory.path())) { std::wstring filename(p.path().filename()); ASSERT_EQ(filename.substr(0, fileNamePrefix.size()), fileNamePrefix); diff --git a/test/CommonLibTests/GlobalVersionTests.cpp b/test/CommonLibTests/GlobalVersionTests.cpp index f38c9361d2..9c74b6720e 100644 --- a/test/CommonLibTests/GlobalVersionTests.cpp +++ b/test/CommonLibTests/GlobalVersionTests.cpp @@ -7,7 +7,7 @@ namespace GlobalVersionTests { using ::testing::Test; - namespace fs = std::filesystem; + namespace fs = std::experimental::filesystem; class GlobalVersionTest : public Test { diff --git a/test/CommonLibTests/Helpers.cpp b/test/CommonLibTests/Helpers.cpp index ccca6cad5b..3e429a6665 100644 --- a/test/CommonLibTests/Helpers.cpp +++ b/test/CommonLibTests/Helpers.cpp @@ -28,7 +28,7 @@ TempDirectory::TempDirectory() RPC_CSTR szUuid = NULL; if (UuidToStringA(&uuid, &szUuid) == RPC_S_OK) { - m_path = std::filesystem::temp_directory_path() / reinterpret_cast(szUuid); + m_path = std::experimental::filesystem::temp_directory_path() / szUuid; RpcStringFreeA(&szUuid); return; } @@ -37,5 +37,5 @@ TempDirectory::TempDirectory() TempDirectory::~TempDirectory() { - std::filesystem::remove_all(m_path); + std::experimental::filesystem::remove_all(m_path); } diff --git a/test/CommonLibTests/Helpers.h b/test/CommonLibTests/Helpers.h index 67256966bb..657766dd43 100644 --- a/test/CommonLibTests/Helpers.h +++ b/test/CommonLibTests/Helpers.h @@ -18,11 +18,11 @@ public: ~TempDirectory(); - std::filesystem::path path() const + std::experimental::filesystem::path path() const { return m_path; } private: - std::filesystem::path m_path; + std::experimental::filesystem::path m_path; };