23 path.append(fileName);
30ScopedFile::ScopedFile(
const std::string &fileContents,
const std::string &fileName,
const std::string &fileDirectory) {
31 Poco::Path path(fileDirectory);
32 path.append(fileName);
65 throw std::runtime_error(
"Cannot open " +
m_filename);
85 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.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
std::string getFileName() const
Getter for the filename with path.
ScopedFile(const std::string &fileContents, const std::string &fileName)
Constructor generates the file.
ScopedFile & operator=(const ScopedFile &other)
Assignement.
void doCreateFile(const std::string &fileContents, const Poco::Path &fileNameAndPath)
Common method used by all constructors.
void release() const
Release the resource from management.
~ScopedFile()
Free up resources.