|
Mantid
|
RAII: Gives a clean file destination and removes the file when handle is out of scope. More...
#include <FileResource.h>
Public Member Functions | |
| bool | exists () |
| FileResource (const std::string &fileName, const bool debugMode=false, const bool randomize=false) | |
| std::string | fullPath () const |
| void | setDebugMode (bool mode) |
| ~FileResource () | |
Static Protected Member Functions | |
| static void * | operator new (std::size_t) |
| static void * | operator new[] (std::size_t) |
Private Attributes | |
| bool | m_debugMode |
| std::filesystem::path | m_full_path |
RAII: Gives a clean file destination and removes the file when handle is out of scope.
Must be stack allocated.
Definition at line 20 of file FileResource.h.
| FileResource::FileResource | ( | const std::string & | fileName, |
| const bool | debugMode = false, |
||
| const bool | randomize = false |
||
| ) |
Definition at line 12 of file FileResource.cpp.
References m_full_path, and Mantid::Kernel::Strings::randomString().
| FileResource::~FileResource | ( | ) |
Definition at line 49 of file FileResource.cpp.
References m_debugMode, and m_full_path.
| bool FileResource::exists | ( | ) |
Definition at line 38 of file FileResource.cpp.
References m_full_path.
| std::string FileResource::fullPath | ( | ) | const |
Definition at line 47 of file FileResource.cpp.
References m_full_path.
|
staticprotected |
|
staticprotected |
| void FileResource::setDebugMode | ( | bool | mode | ) |
Definition at line 46 of file FileResource.cpp.
References m_debugMode.
|
private |
Definition at line 30 of file FileResource.h.
Referenced by setDebugMode(), and ~FileResource().
|
private |
Definition at line 31 of file FileResource.h.
Referenced by exists(), FileResource(), fullPath(), and ~FileResource().