comparison OrthancFramework/Sources/FileStorage/FilesystemStorage.cpp @ 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 0034f855c023
comparison
equal deleted inserted replaced
4184:dbd74fa2f446 4185:b289a1234822
66 #endif 66 #endif
67 67
68 return path; 68 return path;
69 } 69 }
70 70
71 FilesystemStorage::FilesystemStorage(std::string root) 71 void FilesystemStorage::Setup(const std::string& root)
72 { 72 {
73 //root_ = boost::filesystem::absolute(root).string(); 73 //root_ = boost::filesystem::absolute(root).string();
74 root_ = root; 74 root_ = root;
75 75
76 SystemToolbox::MakeDirectory(root); 76 SystemToolbox::MakeDirectory(root);
131 { 131 {
132 throw OrthancException(ErrorCode_FileStorageCannotWrite); 132 throw OrthancException(ErrorCode_FileStorageCannotWrite);
133 } 133 }
134 } 134 }
135 135
136 SystemToolbox::WriteFile(content, size, path.string()); 136 SystemToolbox::WriteFile(content, size, path.string(), fsyncOnWrite_);
137 } 137 }
138 138
139 139
140 void FilesystemStorage::Read(std::string& content, 140 void FilesystemStorage::Read(std::string& content,
141 const std::string& uuid, 141 const std::string& uuid,