merge with master
[platform/framework/web/wrt-plugins-common.git] / src / modules / tizen / Filesystem / Manager.h
index 7edea91..fa59e3d 100644 (file)
@@ -27,7 +27,6 @@
 
 namespace WrtDeviceApis {
 namespace Filesystem {
-
 class Manager : public Api::IManager
 {
   public:
@@ -84,7 +83,7 @@ class Manager : public Api::IManager
      *          only by virtual roots.
      */
     bool access(const Api::IPathPtr& path,
-            int accessType) const;
+                int accessType) const;
 
     void addOpenedNode(const Api::INodePtr& node);
     void removeOpenedNode(const Api::INodePtr& node);
@@ -92,8 +91,8 @@ class Manager : public Api::IManager
 
   protected:
     bool matchFilters(const std::string& name,
-            const struct stat& info,
-            const Api::FiltersMap& filter);
+                      const struct stat& info,
+                      const Api::FiltersMap& filter);
 
     void OnRequestReceived(const Api::EventResolvePtr& event);
     void OnRequestReceived(const Api::EventCopyPtr& event);
@@ -115,12 +114,25 @@ class Manager : public Api::IManager
     static void setupLocation(Api::LocationType location,
                               const char* path);
 
+    void copyElement(const std::string &src,
+                     const std::string &dest,
+                     bool recursive = true) const;
+
+    /**
+     * Check two paths to copy/move. Checks if they are not the same and
+     * required permissions.
+     * @param src
+     * @param dest
+     */
+    void checkPaths(Api::IPathPtr &src, Api::IPathPtr &dest);
+    bool pathExists(const std::string &path);
+
   private:
     static Locations m_locations; ///< Paths to default locations.
     static const std::size_t m_maxPathLength; ///< Maximum path length.
-    static Api::NodeList m_openedNodes; ///< List of nodes that has opened streams.
+    static Api::NodeList m_openedNodes; ///< List of nodes that has opened
+                                        // streams.
 };
-
 } // Filesystem
 } // WrtDeviceApis