Fix getting light user list
[platform/core/appfw/app-installers.git] / src / common / utils / file_util.h
index b2ed7a7..943f083 100644 (file)
@@ -8,6 +8,7 @@
 #include <boost/filesystem.hpp>
 #include <boost/filesystem/path.hpp>
 #include <string>
+#include <vector>
 
 namespace common_installer {
 
@@ -34,6 +35,12 @@ bool CopyDir(const boost::filesystem::path& src,
 bool CopyFile(const boost::filesystem::path& src,
              const boost::filesystem::path& dst);
 
+bool RestoreBackup(const boost::filesystem::path& path);
+
+bool MakeBackup(const boost::filesystem::path& path);
+
+bool RemoveBackup(const boost::filesystem::path& path);
+
 bool RemoveAll(const boost::filesystem::path& path);
 
 bool Remove(const boost::filesystem::path& path);
@@ -44,6 +51,9 @@ bool MoveDir(const boost::filesystem::path& src,
 bool MoveFile(const boost::filesystem::path& src,
               const boost::filesystem::path& dst, bool force = false);
 
+bool BackupDir(const boost::filesystem::path& src,
+    const boost::filesystem::path& dst, const std::string& entry);
+
 bool SetDirPermissions(const boost::filesystem::path& path,
                        boost::filesystem::perms permissions);
 
@@ -58,6 +68,9 @@ int64_t GetUnpackedPackageSize(const boost::filesystem::path& path);
 
 int64_t GetDirectorySize(const boost::filesystem::path& path);
 
+bool CheckFreeSpaceAtPath(int64_t required_size,
+    const boost::filesystem::path& target_location);
+
 boost::filesystem::path GenerateTmpDir(const boost::filesystem::path& app_path);
 
 boost::filesystem::path GenerateTemporaryPath(
@@ -82,6 +95,11 @@ boost::filesystem::path MakeRelativePath(const boost::filesystem::path& input,
 bool IsSubDir(const boost::filesystem::path& path,
               const boost::filesystem::path& root);
 
+boost::filesystem::path RelativePath(const boost::filesystem::path& from,
+                                     const boost::filesystem::path& to);
+
+std::vector<std::string> GetDirectoryList(const boost::filesystem::path& cwd);
+
 }  // namespace common_installer
 
 #endif  // COMMON_UTILS_FILE_UTIL_H_