Mercurial > hg > orthanc
comparison OrthancFramework/Sources/SystemToolbox.cpp @ 4279:ab4d015af660
moving inline methods to source files for ABI compatibility
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 03 Nov 2020 20:48:01 +0100 |
parents | c8754c4c1862 |
children | 785a2713323e |
comparison
equal
deleted
inserted
replaced
4278:9279de56a405 | 4279:ab4d015af660 |
---|---|
231 | 231 |
232 f.close(); | 232 f.close(); |
233 } | 233 } |
234 | 234 |
235 | 235 |
236 void Orthanc::SystemToolbox::ReadFile(std::string &content, const std::string &path) | |
237 { | |
238 ReadFile(content, path, true /* log */); | |
239 } | |
240 | |
241 | |
236 bool SystemToolbox::ReadHeader(std::string& header, | 242 bool SystemToolbox::ReadHeader(std::string& header, |
237 const std::string& path, | 243 const std::string& path, |
238 size_t headerSize) | 244 size_t headerSize) |
239 { | 245 { |
240 if (!IsRegularFile(path)) | 246 if (!IsRegularFile(path)) |
334 | 340 |
335 f.close(); | 341 f.close(); |
336 } | 342 } |
337 | 343 |
338 | 344 |
345 void SystemToolbox::WriteFile(const void *content, size_t size, const std::string &path) | |
346 { | |
347 WriteFile(content, size, path, false /* don't automatically call fsync */); | |
348 } | |
349 | |
350 | |
339 void SystemToolbox::WriteFile(const std::string& content, | 351 void SystemToolbox::WriteFile(const std::string& content, |
340 const std::string& path, | 352 const std::string& path, |
341 bool callFsync) | 353 bool callFsync) |
342 { | 354 { |
343 WriteFile(content.size() > 0 ? content.c_str() : NULL, | 355 WriteFile(content.size() > 0 ? content.c_str() : NULL, |
344 content.size(), path, callFsync); | 356 content.size(), path, callFsync); |
357 } | |
358 | |
359 | |
360 void SystemToolbox::WriteFile(const std::string &content, const std::string &path) | |
361 { | |
362 WriteFile(content, path, false /* don't automatically call fsync */); | |
345 } | 363 } |
346 | 364 |
347 | 365 |
348 void SystemToolbox::RemoveFile(const std::string& path) | 366 void SystemToolbox::RemoveFile(const std::string& path) |
349 { | 367 { |