Mercurial > hg > orthanc
comparison Core/FileStorage.cpp @ 201:bee20e978835
refactoring of delete
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 27 Nov 2012 17:36:19 +0100 |
parents | 0fadb04728ba |
children |
comparison
equal
deleted
inserted
replaced
200:9c58b2b03cf0 | 201:bee20e978835 |
---|---|
38 #include "OrthancException.h" | 38 #include "OrthancException.h" |
39 #include "Toolbox.h" | 39 #include "Toolbox.h" |
40 #include "Uuid.h" | 40 #include "Uuid.h" |
41 | 41 |
42 #include <boost/filesystem/fstream.hpp> | 42 #include <boost/filesystem/fstream.hpp> |
43 #include <glog/logging.h> | |
43 | 44 |
44 static std::string ToString(const boost::filesystem::path& p) | 45 static std::string ToString(const boost::filesystem::path& p) |
45 { | 46 { |
46 #if BOOST_HAS_FILESYSTEM_V3 == 1 | 47 #if BOOST_HAS_FILESYSTEM_V3 == 1 |
47 return p.filename().string(); | 48 return p.filename().string(); |
273 } | 274 } |
274 | 275 |
275 | 276 |
276 void FileStorage::Remove(const std::string& uuid) | 277 void FileStorage::Remove(const std::string& uuid) |
277 { | 278 { |
279 LOG(INFO) << "Deleting file " << uuid; | |
278 namespace fs = boost::filesystem; | 280 namespace fs = boost::filesystem; |
279 | 281 |
280 fs::path p = GetPath(uuid); | 282 fs::path p = GetPath(uuid); |
281 | 283 |
282 try | 284 try |