18#ifndef __FPSDK_COMMON_PATH_HPP__
19#define __FPSDK_COMMON_PATH_HPP__
74 bool Open(
const std::string& path);
88 bool Write(
const std::vector<uint8_t>& data);
97 bool Write(
const uint8_t* data,
const std::size_t size);
108 std::unique_ptr<std::ostream> fh_;
119bool FileSlurp(
const std::string& path, std::vector<uint8_t>& data);
129bool FileSpew(
const std::string& path,
const std::vector<uint8_t>& data);
bool Open(const std::string &path)
Open output file for writing.
bool Write(const uint8_t *data, const std::size_t size)
Write data to file.
const std::string & GetPath() const
Get file path.
void Close()
Close output file.
bool Write(const std::vector< uint8_t > &data)
Write data to file.
bool PathExists(const std::string &path)
Check if path exists.
std::size_t FileSize(const std::string &path)
Get file size.
bool FileSlurp(const std::string &path, std::vector< uint8_t > &data)
Read entire file into a string.
bool FileSpew(const std::string &path, const std::vector< uint8_t > &data)
Write string to file.