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.

Return

std::string the absolute path to the log directory

Parameters
  • app_name: is the application name

bool create_directory(std::string path)

Create a directory.

Return

true if everything went well

Return

false if a problem occur

Parameters
  • path: is the path to be created

std::string get_home_dir()

Get the home directory path.

Return

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