Move filesystem from experimental namespace

Splice it into standard for gcc8

Change-Id: I584206dd737c9d90cf93bfa8541980fdd8f6d39b
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/include/filesystem.hpp b/include/filesystem.hpp
new file mode 100644
index 0000000..ead619e
--- /dev/null
+++ b/include/filesystem.hpp
@@ -0,0 +1,14 @@
+// this file splices filesystem in depending on the implementation
+
+#if __has_include(<filesystem>)
+#include <filesystem.hpp>
+#elif __has_include(<experimental/filesystem>)
+#include <experimental/filesystem>
+namespace std
+{
+// splice experimental::filesystem into std
+namespace filesystem = std::experimental::filesystem;
+} // namespace std
+#else
+#error filesystem not available
+#endif
\ No newline at end of file
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index 4c68fac..8b9bd05 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -13,6 +13,8 @@
 // limitations under the License.
 
 #pragma once
+#include "filesystem.hpp"
+
 #include <crow/app.h>
 #include <tinyxml2.h>
 
@@ -21,7 +23,6 @@
 #include <boost/container/flat_set.hpp>
 #include <dbus_singleton.hpp>
 #include <dbus_utility.hpp>
-#include <experimental/filesystem>
 #include <fstream>
 #include <sdbusplus/message/types.hpp>
 
@@ -1516,20 +1517,20 @@
                 res.end();
                 return;
             }
-            std::experimental::filesystem::path loc(
+            std::filesystem::path loc(
                 "/var/lib/phosphor-debug-collector/dumps");
 
             loc /= dumpId;
 
-            if (!std::experimental::filesystem::exists(loc) ||
-                !std::experimental::filesystem::is_directory(loc))
+            if (!std::filesystem::exists(loc) ||
+                !std::filesystem::is_directory(loc))
             {
                 BMCWEB_LOG_ERROR << loc << "Not found";
                 res.result(boost::beast::http::status::not_found);
                 res.end();
                 return;
             }
-            std::experimental::filesystem::directory_iterator files(loc);
+            std::filesystem::directory_iterator files(loc);
 
             for (auto &file : files)
             {
diff --git a/include/webassets.hpp b/include/webassets.hpp
index 81bed50..9bd40db 100644
--- a/include/webassets.hpp
+++ b/include/webassets.hpp
@@ -1,5 +1,7 @@
 #pragma once
 
+#include "filesystem.hpp"
+
 #include <crow/app.h>
 #include <crow/http_request.h>
 #include <crow/http_response.h>
@@ -7,7 +9,6 @@
 
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/container/flat_set.hpp>
-#include <experimental/filesystem>
 #include <fstream>
 #include <string>
 
@@ -16,7 +17,7 @@
 namespace webassets
 {
 
-namespace filesystem = std::experimental::filesystem;
+namespace filesystem = std::filesystem;
 
 struct CmpStr
 {