diff OrthancFramework/Sources/FileStorage/FilesystemStorage.h @ 4185:b289a1234822

giving a try to cross-platform compilation of SyncStorageArea
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 14 Sep 2020 18:09:30 +0200
parents bf7b9edf6b81
children 7112a8af0b63
line wrap: on
line diff
--- a/OrthancFramework/Sources/FileStorage/FilesystemStorage.h	Sat Sep 12 16:03:48 2020 +0200
+++ b/OrthancFramework/Sources/FileStorage/FilesystemStorage.h	Mon Sep 14 18:09:30 2020 +0200
@@ -48,11 +48,25 @@
 
   private:
     boost::filesystem::path root_;
+    bool                    fsyncOnWrite_;
 
     boost::filesystem::path GetPath(const std::string& uuid) const;
 
+    void Setup(const std::string& root);
+    
   public:
-    explicit FilesystemStorage(std::string root);
+    explicit FilesystemStorage(const std::string& root) :
+      fsyncOnWrite_(false)
+    {
+      Setup(root);
+    }
+
+    FilesystemStorage(const std::string& root,
+                      bool fsyncOnWrite) :
+      fsyncOnWrite_(fsyncOnWrite)
+    {
+      Setup(root);
+    }
 
     virtual void Create(const std::string& uuid,
                         const void* content,