Mercurial > hg > orthanc
diff OrthancFramework/Sources/SystemToolbox.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 | ab4d015af660 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/SystemToolbox.h Sat Sep 12 16:03:48 2020 +0200 +++ b/OrthancFramework/Sources/SystemToolbox.h Mon Sep 14 18:09:30 2020 +0200 @@ -52,7 +52,13 @@ static void ReadFile(std::string& content, const std::string& path, - bool log = true); + bool log); + + static void ReadFile(std::string& content, + const std::string& path) + { + ReadFile(content, path, true /* log */); + } static bool ReadHeader(std::string& header, const std::string& path, @@ -60,10 +66,25 @@ static void WriteFile(const void* content, size_t size, - const std::string& path); + const std::string& path, + bool callFsync); + + static void WriteFile(const void* content, + size_t size, + const std::string& path) + { + WriteFile(content, size, path, false /* don't automatically call fsync */); + } static void WriteFile(const std::string& content, - const std::string& path); + const std::string& path, + bool callFsync); + + static void WriteFile(const std::string& content, + const std::string& path) + { + WriteFile(content, path, false /* don't automatically call fsync */); + } static void RemoveFile(const std::string& path);