Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / recovery_file.h
index d68fb60..f2d3260 100644 (file)
@@ -5,9 +5,8 @@
 #ifndef COMMON_RECOVERY_FILE_H_
 #define COMMON_RECOVERY_FILE_H_
 
-#include <boost/filesystem/path.hpp>
-
 #include <cstdio>
+#include <filesystem>
 #include <memory>
 #include <string>
 
@@ -33,7 +32,7 @@ class RecoveryFile {
    * \return new RecoveryFile object
    */
   static std::unique_ptr<RecoveryFile> CreateRecoveryFile(
-      const boost::filesystem::path& path, RequestType type);
+      const std::filesystem::path& path, RequestType type);
 
   /**
    * Opens RecoveryFile object for given request
@@ -43,7 +42,7 @@ class RecoveryFile {
    * \return new RecoveryFile object
    */
   static std::unique_ptr<RecoveryFile> OpenRecoveryFile(
-      const boost::filesystem::path& path);
+      const std::filesystem::path& path);
 
   /** Desctructor */
   ~RecoveryFile();
@@ -64,7 +63,7 @@ class RecoveryFile {
    *
    * \param unpacked_dir new unpacked_dir value
    */
-  void set_unpacked_dir(boost::filesystem::path unpacked_dir);
+  void set_unpacked_dir(std::filesystem::path unpacked_dir);
 
   /**
    * setter for pkgid
@@ -99,7 +98,7 @@ class RecoveryFile {
    *
    * \return current unpacked_dir
    */
-  const boost::filesystem::path& unpacked_dir() const;
+  const std::filesystem::path& unpacked_dir() const;
 
   /**
    * getter for pkgid
@@ -144,17 +143,17 @@ class RecoveryFile {
   bool WriteAndCommitFileContent();
 
  private:
-  RecoveryFile(const boost::filesystem::path& path, RequestType type,
+  RecoveryFile(const std::filesystem::path& path, RequestType type,
       bool load);
 
   bool ReadFileContent();
 
   RequestType type_;
-  boost::filesystem::path unpacked_dir_;
+  std::filesystem::path unpacked_dir_;
   std::string pkgid_;
 
-  boost::filesystem::path path_;
-  boost::filesystem::path backup_path_;
+  std::filesystem::path path_;
+  std::filesystem::path backup_path_;
   bool backup_done_;
   bool cleanup_;
   bool security_operation_done_;