Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Enumerations | Functions
IoUtils Namespace Reference

Enumerations

enum  Mode { APPEND, TRUNCATE }
 

Functions

std::ofstream openOutput (const std::string &path, Mode mode=TRUNCATE)
 
int writeTextFile (const std::string &path, const std::string &content, Mode mode=TRUNCATE)
 
std::string readTextFile (const std::string &path)
 

Detailed Description

Utilities to perform file I/O.

Enumeration Type Documentation

Enumerator
APPEND 

When opening a file for writing, append to the existing content of the file.

TRUNCATE 

When opening a file for writing, truncate the existing content of the file.

Function Documentation

std::ofstream IoUtils::openOutput ( const std::string &  path,
Mode  mode = TRUNCATE 
)

Open a file for output.

int IoUtils::writeTextFile ( const std::string &  path,
const std::string &  content,
Mode  mode = TRUNCATE 
)

Write a string to a file.

std::string IoUtils::readTextFile ( const std::string &  path)

Read a text file as a string.