File iostream.hpp

Tools for console message display.

Author

Maximilien Naveau (maximilien.naveau@gmail.com) license License BSD-3-Clause

Copyright

Copyright (c) 2019, New York University and Max Planck Gesellschaft.

Date

2019-05-22

namespace real_time_tools

Functions

std::string get_log_dir(std::string app_name)

Get the logging directory based on a specific application.

It creates a direction in $HOME/app_name/YEAR_MONTH_DAY_HOUR_SECOND/ and return the absolute path of this. It allows the user to dump data in different folders everytime the user launch the application.

Parameters:

app_name – is the application name

Returns:

std::string the absolute path to the log directory

bool create_directory(std::string path)

Create a directory.

Parameters:

path – is the path to be created

Returns:

true if everything went well

Returns:

false if a problem occur

std::string get_home_dir()

Get the home directory path.

Returns:

std::string the home directory absolute path ending with a “/”