I/O handling functions
More...
#include <FileIo.h>
|
static ByteArray | readFile (const char *filePath) |
|
static void | writeToFile (const char *filePath, ByteArray &data) |
|
I/O handling functions
This class contains functions that will help with i/o throughout the milestones.
Data read from file or to be written to file must be loaded in the ByteArray Object from Libcryptosec. To handle the i/o, use fstream from standard library. Errors in read and write static functions should return IoException with apropriate error code.
- See also
- std::fstream
-
libcryptosec/ByteArray
-
IoException
- Author
- Lucas Perin
◆ ~FileIo()
◆ readFile()
ByteArray FileIo::readFile |
( |
const char * |
filePath | ) |
|
|
static |
Static function. Reads files with from file path. TODO implement this function in the cpp file.
- Parameters
-
filePath | string with path to file. |
- Returns
- ByteArray containing data read from file.
TODO(milestone1)
◆ writeToFile()
void FileIo::writeToFile |
( |
const char * |
filePath, |
|
|
ByteArray & |
data |
|
) |
| |
|
static |
Static function. Writes data to file. TODO implement this function in the cpp file.
- Parameters
-
ByteArray | containing data to write to file. |
TODO(milestone2)
The documentation for this class was generated from the following files: