24 std::filesystem::path path(Mantid::Kernel::ConfigService::Instance().getTempDir().c_str());
32ScopedFile::ScopedFile(
const std::string &fileContents,
const std::string &fileName,
const std::string &fileDirectory) {
33 std::filesystem::path path(fileDirectory);
67 throw std::runtime_error(
"Cannot open " +
m_filename);
87 logger.error() <<
"~ScopedFile() - Error deleting file '" <<
m_filename <<
"'\n";
The Logger class is in charge of the publishing messages from the framework through various channels.
ScopedFile(const std::string &fileContents, const std::string &fileName)
Constructor generates the file.
ScopedFile & operator=(const ScopedFile &other)
Assignement.
void release() const
Release the resource from management.
const std::string & getFileName() const
Getter for the filename with path.
void doCreateFile(const std::string &fileContents, const std::filesystem::path &fileNameAndPath)
Common method used by all constructors.
~ScopedFile()
Free up resources.