29 #ifndef CDPL_UTIL_FILEREMOVER_HPP
30 #define CDPL_UTIL_FILEREMOVER_HPP
73 void reset(
const std::string& new_path);
Definition of the preprocessor macro CDPL_UTIL_API.
#define CDPL_UTIL_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
RAII helper that deletes a file when the FileRemover instance goes out of scope (unless released befo...
Definition: FileRemover.hpp:48
void reset(const std::string &new_path)
Replaces the currently held path with new_path; the previously held file is removed immediately.
void release()
Releases the FileRemover from its current path so that the file will not be removed on destruction.
const std::string & getPath() const
Returns the file-system path currently guarded by the FileRemover.
~FileRemover()
Destructor. Removes the file at the currently held path unless release() has been called.
FileRemover & operator=(FileRemover &rhs)
Move-style assignment: takes over the path held by rhs and releases rhs.
FileRemover(const std::string &path)
Constructs a FileRemover guarding the file at path.
Definition: FileRemover.hpp:55
The namespace of the Chemical Data Processing Library.