fw4spl
|
Provide a system to get a Temporary folder which allow multi-user, multi-instance separation. More...
#include <System.hpp>
Static Public Member Functions | |
static FWTOOLS_APIconst::boost::filesystem::path & | getTempPath () noexcept |
Returns the system's temporary folder. Returns the value returned by boost::filesystem::temp_directory_path, or if boost returns no valid dir, c:\ on windows, /tmp on other systems. | |
static FWTOOLS_APIconst::boost::filesystem::path | getTemporaryFolder (const std::string &subFolderPrefix="") noexcept |
Returns a unique per-process temporary folder. The top level temporary folder will be automatically destroyed if the process ends properly. More... | |
static FWTOOLS_API int | tempFolderPID (const ::boost::filesystem::path &dir) noexcept |
Returns the pid of a temporary folder If the given folder contains a file matching *.pid and the first part of the file name is a integer, this method will return this number. Otherwise, zero will be returned. | |
static FWTOOLS_API void | cleanZombies (const ::boost::filesystem::path &dir) noexcept |
Clean the zombie folders of old processes in given directory. | |
static FWTOOLS_API int | getPID () noexcept |
Returns the pid of the current process. | |
static FWTOOLS_API bool | isProcessRunning (int pid) noexcept |
Test if process is Active. More... | |
static void | setTempPrefix (const std::string &prefix) |
Sets the temporary folder prefix. The prefix must be set before the first call to getTemporaryFolder, otherwise, it won't be used. | |
Static Protected Attributes | |
static std::string | s_tempPrefix |
Provide a system to get a Temporary folder which allow multi-user, multi-instance separation.
Definition at line 26 of file System.hpp.
|
staticnoexcept |
Returns a unique per-process temporary folder. The top level temporary folder will be automatically destroyed if the process ends properly.
subFolderPrefix | if set, creates a sub folder in temporary folder prefixed with parameter value followed by a dash. |
Definition at line 148 of file System.cpp.
References OSLM_INFO.
Referenced by fwGdcmIO::helper::DicomSeriesAnonymizer::anonymize(), fwMemory::BufferManager::dumpBuffer(), fwNetworkIO::http::ClientQt::getFile(), fwPacsIO::SeriesRetriever::initialize(), fwPacsIO::SeriesEnquirer::initialize(), ioPacs::SSliceIndexDicomPullerEditor::pullInstance(), ioDicom::SSliceIndexDicomEditor::readImage(), ioPacs::SSliceIndexDicomPullerEditor::readImage(), ioPacs::SSeriesPuller::readLocalSeries(), fwGdcmIO::helper::DicomAnonymizer::removeAnonymizeTag(), and ioDicomWeb::SSliceIndexDicomPullerEditor::updating().
|
staticnoexcept |
Test if process is Active.
Definition at line 188 of file System.cpp.