Fixposition SDK 0.0.0-heads/main-0-g408dc89
Collection of c++ libraries and apps for use with Fixposition products on Linux
Loading...
Searching...
No Matches
fpsdk::common::path::OutputFile Class Reference

Output file handle. More...

#include <path.hpp>

Public Member Functions

bool Open (const std::string &path)
 Open output file for writing.
void Close ()
 Close output file.
bool Write (const std::vector< uint8_t > &data)
 Write data to file.
bool Write (const uint8_t *data, const std::size_t size)
 Write data to file.
const std::string & Path () const
 Get file path.
bool IsOpen () const
 Check if output file is open.
std::size_t Size () const
 Get file size.
const std::string & Error () const
 Get error.

Detailed Description

Output file handle.

Definition at line 115 of file path.hpp.

Member Function Documentation

◆ Open()

bool fpsdk::common::path::OutputFile::Open ( const std::string & path)

Open output file for writing.

Parameters
[in]pathThe path / filename, can end in ".gz" for compressed output
Returns
true on success, failure otherwise

◆ Write() [1/2]

bool fpsdk::common::path::OutputFile::Write ( const std::vector< uint8_t > & data)

Write data to file.

Parameters
[in]dataThe data to be written
Returns
true on success, false otherwise

◆ Write() [2/2]

bool fpsdk::common::path::OutputFile::Write ( const uint8_t * data,
const std::size_t size )

Write data to file.

Parameters
[in]dataThe data to be written
[in]sizeThe size of the data to be written
Returns
true on success, false otherwise

◆ Path()

const std::string & fpsdk::common::path::OutputFile::Path ( ) const

Get file path.

Returns
the file path if the file has been opened before, the empty string otherwise

◆ IsOpen()

bool fpsdk::common::path::OutputFile::IsOpen ( ) const

Check if output file is open.

Returns
true if the file is open, false otherwise

◆ Size()

std::size_t fpsdk::common::path::OutputFile::Size ( ) const

Get file size.

Returns
the size written to the file so far

◆ Error()

const std::string & fpsdk::common::path::OutputFile::Error ( ) const

Get error.

Returns
an error string in case of error (e.g. after Write() failed), the empty string if there's no error

The documentation for this class was generated from the following file:
  • fpsdk_common/include/fpsdk_common/path.hpp