20#ifndef FILE_OPERATIONS_HH_
21#define FILE_OPERATIONS_HH_
54 public:
bool WriteFile(
const std::string& file_path,
const std::string& contents);
60 public:
bool WriteFile(
const std::string& contents);
85 private: std::string active_file_path;
Singleton class to handle file operations.
Definition file_operations.h:30
FileOperations()=default
Prevent access to the constructor of this class.
std::string OpenFileDialog()
Opens a dialog for the user to open a file on their filesystem.
Definition file_operations.cpp:29
FileOperations & operator=(const FileOperations &)=delete
Prevent the assignment of one instance of FileOperations to another, ensuring there can only be one i...
static FileOperations & GetSoleInstance()
The only method by which a FileOperations instance can be returned.
Definition file_operations.cpp:22
bool WriteFile(const std::string &file_path, const std::string &contents)
writes a string to a file
Definition file_operations.cpp:89
std::string OpenDirectoryDialog()
Opens a dialog for the user to open a directory on their filesystem.
Definition file_operations.cpp:53
void SetActiveFilePath(const std::string &file_path)
Sets the active file path.
Definition file_operations.cpp:79
FileOperations(const FileOperations &)=delete
Delete the copy constructor of FileOperations, preventing copies of the reference the the sole instan...
~FileOperations()=default
Prevent access to the destructor of this class.