Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / utils / paths.h
index 996b6a9..6796b7a 100644 (file)
@@ -5,10 +5,9 @@
 #ifndef COMMON_UTILS_PATHS_H_
 #define COMMON_UTILS_PATHS_H_
 
-#include <boost/filesystem/path.hpp>
-#include <boost/filesystem/operations.hpp>
 #include <unistd.h>
 
+#include <filesystem>
 #include <string>
 
 #include "common/utils/request.h"
@@ -23,8 +22,8 @@ namespace common_installer {
  *
  * \return backup path
  */
-boost::filesystem::path GetBackupPathForPackagePath(
-    const boost::filesystem::path& pkg_path);
+std::filesystem::path GetBackupPathForPackagePath(
+    const std::filesystem::path& pkg_path);
 
 /**
  * \brief Helper function for getting backup path (used for recovery)
@@ -34,8 +33,8 @@ boost::filesystem::path GetBackupPathForPackagePath(
  *
  * \return backup path
  */
-boost::filesystem::path GetBackupPathForManifestFile(
-    const boost::filesystem::path& manifest_path);
+std::filesystem::path GetBackupPathForManifestFile(
+    const std::filesystem::path& manifest_path);
 
 /**
  * \brief Helper function for getting backup path (used for recovery)
@@ -45,8 +44,8 @@ boost::filesystem::path GetBackupPathForManifestFile(
  *
  * \return backup path
  */
-boost::filesystem::path GetBackupPathForIconFile(
-    const boost::filesystem::path& icon_path);
+std::filesystem::path GetBackupPathForIconFile(
+    const std::filesystem::path& icon_path);
 
 /**
  * @brief GetIconFileBackupExtension
@@ -62,8 +61,8 @@ std::string GetIconFileBackupExtension();
  *
  * \return backup path of zip
  */
-boost::filesystem::path GetBackupPathForZipFile(
-    const boost::filesystem::path& zip_path);
+std::filesystem::path GetBackupPathForZipFile(
+    const std::filesystem::path& zip_path);
 
 /**
  * @brief GetZipPackageLocation
@@ -75,8 +74,8 @@ boost::filesystem::path GetBackupPathForZipFile(
  *
  * @return full path of zip package location
  */
-boost::filesystem::path GetZipPackageLocation(
-    const boost::filesystem::path& pkg_path,
+std::filesystem::path GetZipPackageLocation(
+    const std::filesystem::path& pkg_path,
     const std::string& pkgid);
 
 /**
@@ -88,8 +87,8 @@ boost::filesystem::path GetZipPackageLocation(
  *
  * @return full path of package mount point
  */
-boost::filesystem::path GetMountLocation(
-    const boost::filesystem::path& pkg_path);
+std::filesystem::path GetMountLocation(
+    const std::filesystem::path& pkg_path);
 
 /**
  * @brief GetExternalCardPath
@@ -97,7 +96,7 @@ boost::filesystem::path GetMountLocation(
  *
  * @return path
  */
-boost::filesystem::path GetExternalCardPath();
+std::filesystem::path GetExternalCardPath();
 
 /**
  * @brief GetExternalTepPath
@@ -107,7 +106,7 @@ boost::filesystem::path GetExternalCardPath();
  *
  * @return full directory path
  */
-boost::filesystem::path GetExternalTepPath(RequestMode request_mode, uid_t uid);
+std::filesystem::path GetExternalTepPath(RequestMode request_mode, uid_t uid);
 
 /**
  * @brief GetInternalTepPath
@@ -116,8 +115,8 @@ boost::filesystem::path GetExternalTepPath(RequestMode request_mode, uid_t uid);
  *
  * @return full directory path
  */
-boost::filesystem::path GetInternalTepPath(
-    const boost::filesystem::path& pkg_path);
+std::filesystem::path GetInternalTepPath(
+    const std::filesystem::path& pkg_path);
 
 /**
  * @brief GetIconPath
@@ -129,10 +128,10 @@ boost::filesystem::path GetInternalTepPath(
  *
  * @return full icon path
  */
-boost::filesystem::path GetIconPath(const boost::filesystem::path& base_path,
+std::filesystem::path GetIconPath(const std::filesystem::path& base_path,
                       const std::string& pkgid,
-                      const boost::filesystem::path& icon_filename,
-                      const boost::filesystem::path& root_path);
+                      const std::filesystem::path& icon_filename,
+                      const std::filesystem::path& root_path);
 
 /**
  * @brief IsExtendedStorageAvailable