This class provides an interface for working with files.
More...
#include <AuxFile.h>
|
enum | Mode { Idle = 0
, Read = 1
, Write = 2
} |
| Easy way to specify the Read/Write behavior of the File Stream. More...
|
|
|
| File (const File &file)=default |
|
virtual bool | open (const std::string &fileName, const Mode &mode=Mode::Read, bool log=false)=0 |
| Implement this function to specify the opening behavior of the File.
|
|
virtual bool | close (bool log=false)=0 |
| Implement this function to specify the closing behavior of the File.
|
|
std::string | getCurrentDirectory () |
| Returns the current directory, the program is running in.
|
|
std::vector< std::string > & | getListOfFiles (const std::string &extension="") |
| Returns list of files present in the current directory.
|
|
void | Log () override |
| Override this function to specify logging behavior.
|
|
|
void | setColour (const ColourType &colourType) |
| This function allows you to set text colour for the text to be printed onto the console.
|
|
This class provides an interface for working with files.
Definition at line 182 of file AuxFile.h.
◆ Mode
Easy way to specify the Read/Write behavior of the File Stream.
Definition at line 188 of file AuxFile.h.
◆ File()
◆ close()
virtual bool AuxPort::File::close |
( |
bool | log = false | ) |
|
|
pure virtual |
◆ getCurrentDirectory()
std::string AuxPort::File::getCurrentDirectory |
( |
| ) |
|
Returns the current directory, the program is running in.
Definition at line 97 of file AuxFile.cpp.
◆ getListOfFiles()
std::vector< std::string > & AuxPort::File::getListOfFiles |
( |
const std::string & | extension = "" | ) |
|
Returns list of files present in the current directory.
Definition at line 55 of file AuxFile.cpp.
◆ Log()
void AuxPort::File::Log |
( |
| ) |
|
|
overridevirtual |
◆ open()
virtual bool AuxPort::File::open |
( |
const std::string & | fileName, |
|
|
const Mode & | mode = Mode::Read, |
|
|
bool | log = false ) |
|
pure virtual |
◆ errorMessage
std::string AuxPort::File::errorMessage |
|
protected |
◆ fileExtension
std::string AuxPort::File::fileExtension |
|
protected |
◆ fileName
std::string AuxPort::File::fileName |
|
protected |
◆ fileReader
std::unique_ptr<std::ifstream> AuxPort::File::fileReader |
|
protected |
◆ fileWriter
std::unique_ptr<std::ofstream> AuxPort::File::fileWriter |
|
protected |
◆ mode
The documentation for this class was generated from the following files:
- C:/ROOT/AuxPort/AuxPort_Master/master/AuxPort/Core/File/AuxFile.h
- C:/ROOT/AuxPort/AuxPort_Master/master/AuxPort/Core/File/AuxFile.cpp