Desafio Labsec (SGC)
Public Member Functions | Static Public Member Functions | List of all members
FileIo Class Reference

I/O handling functions More...

#include <FileIo.h>

Public Member Functions

virtual ~FileIo ()
 

Static Public Member Functions

static ByteArray readFile (const char *filePath)
 
static void writeToFile (const char *filePath, ByteArray &data)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ~FileIo()

FileIo::~FileIo ( )
virtual

Member Function Documentation

◆ 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
filePathstring 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
ByteArraycontaining data to write to file.

TODO(milestone2)


The documentation for this class was generated from the following files: