Reads a file from the file system.
More...
#include <FileReader.hpp>
|
static const bool | isReadable (const std::string &filePath) |
| Checks if file exists and is readable.
|
|
static const uint64 | read (const std::string &filePath, uint8 **buffer) |
| Reads contents of file into byte buffer. Caller takes ownership of the resulting char buffer.
|
|
static const std::vector< uint8 > | read (const std::string &filePath) |
| Reads contents of file into byte vector.
|
|
Reads a file from the file system.
FileReader class.
◆ isReadable()
const bool switchboard::FileReader::isReadable |
( |
const std::string & |
filePath | ) |
|
|
static |
Checks if file exists and is readable.
- Parameters
-
filePath | Path of the file to read. |
- Returns
- True if file exists and readable, false otherwise.
◆ read() [1/2]
const std::vector< uint8 > switchboard::FileReader::read |
( |
const std::string & |
filePath | ) |
|
|
static |
Reads contents of file into byte vector.
- Parameters
-
filePath | Path of the file to be read. |
- Returns
- Byte vector of the read data.
◆ read() [2/2]
const uint64 switchboard::FileReader::read |
( |
const std::string & |
filePath, |
|
|
uint8 ** |
buffer |
|
) |
| |
|
static |
Reads contents of file into byte buffer. Caller takes ownership of the resulting char buffer.
- Parameters
-
filePath | Path of the file to be read in the file system. |
buffer | [inout] Pointer where the data buffer will be allocated. |
- Returns
- Number of bytes read.
The documentation for this class was generated from the following files:
- /Users/jenkins/.jenkins/workspace/Switchboard Developer Site - Production/SwitchboardSDK/src/all/File/FileReader.hpp
- /Users/jenkins/.jenkins/workspace/Switchboard Developer Site - Production/SwitchboardSDK/src/all/File/FileReader.cpp