File.cpp File Reference
`#include "packet.h"`
`#include <string>`
`#include <fstream>`
`#include <vector>`

## Functions

bool | ReadFile (string fname, vector< Packet > &netdata)
| Function that reads a file and return a boolean that determines if the file was succesfully opened and read or not. More...
bool | SaveFile (string fname, vector< Packet > netdata)
| Function that saves a file to the computer. It returns true when the file was succesfully saved and false if an error occurred. More...

## Function Documentation

bool ReadFile | ( | string | fname,
|  | vector< Packet > & | netdata
| ) |  |

Function that reads a file and return a boolean that determines if the file was succesfully opened and read or not.

Parameters

  fname | String that contains the filename of the file.
  netdata | Vector of packets.

Returns
  true if successfuly read a file, false otherwise

bool SaveFile | ( | string | fname,
|  | vector< Packet > | netdata
| ) |  |

Function that saves a file to the computer. It returns true when the file was succesfully saved and false if an error occurred.

Parameters

  fname | String that contains the filename of the file.
  netdata | Vector of packets.

Returns
  true if successfuly read a file, false otherwise