comparison Core/Uuid.cpp @ 82:9eb40cad7935

fixes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 24 Sep 2012 14:05:19 +0200
parents c996319e90bc
children fd7b0a3e6260
comparison
equal deleted inserted replaced
81:0ec5e2e327b1 82:9eb40cad7935
28 #include <rpc.h> 28 #include <rpc.h>
29 #else 29 #else
30 #include <uuid/uuid.h> 30 #include <uuid/uuid.h>
31 #endif 31 #endif
32 } 32 }
33
34 #include <boost/filesystem.hpp>
33 35
34 namespace Orthanc 36 namespace Orthanc
35 { 37 {
36 namespace Toolbox 38 namespace Toolbox
37 { 39 {
78 } 80 }
79 } 81 }
80 82
81 return true; 83 return true;
82 } 84 }
85
86
87 TemporaryFile::TemporaryFile()
88 {
89 // We use UUID to create unique path to temporary files
90 boost::filesystem::path tmp = boost::filesystem::temp_directory_path();
91 tmp /= "Orthanc-" + Orthanc::Toolbox::GenerateUuid();
92 path_ = tmp.string();
93 }
94
95
96 TemporaryFile::~TemporaryFile()
97 {
98 boost::filesystem::remove(path_);
99 }
83 } 100 }
84 } 101 }