diff Core/FileStorage/FilesystemStorage.cpp @ 1126:bf67431a7383

handling of file content type in IStorageArea
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 05 Sep 2014 17:01:42 +0200
parents 790ff7a5b3bf
children 67c3c1e4a6e0
line wrap: on
line diff
--- a/Core/FileStorage/FilesystemStorage.cpp	Fri Sep 05 16:28:47 2014 +0200
+++ b/Core/FileStorage/FilesystemStorage.cpp	Fri Sep 05 17:01:42 2014 +0200
@@ -85,7 +85,9 @@
     Toolbox::CreateDirectory(root);
   }
 
-  std::string FilesystemStorage::Create(const void* content, size_t size)
+  std::string FilesystemStorage::Create(const void* content, 
+                                        size_t size,
+                                        FileContentType /*type*/)
   {
     std::string uuid;
     boost::filesystem::path path;
@@ -144,7 +146,8 @@
 
 
   void FilesystemStorage::Read(std::string& content,
-                               const std::string& uuid) const
+                               const std::string& uuid,
+                               FileContentType /*type*/) const
   {
     content.clear();
     Toolbox::ReadFile(content, GetPath(uuid).string());
@@ -209,12 +212,13 @@
 
     for (List::const_iterator it = result.begin(); it != result.end(); ++it)
     {
-      Remove(*it);
+      Remove(*it, FileContentType_Unknown /*ignored in this class*/);
     }
   }
 
 
-  void FilesystemStorage::Remove(const std::string& uuid)
+  void FilesystemStorage::Remove(const std::string& uuid,
+                                 FileContentType /*type*/)
   {
     LOG(INFO) << "Deleting file " << uuid;
     namespace fs = boost::filesystem;