2020-01-16 13:32:29 -06:00
|
|
|
#ifndef OPENFPGA_DIGEST_H
|
|
|
|
#define OPENFPGA_DIGEST_H
|
|
|
|
|
|
|
|
/********************************************************************
|
|
|
|
* Include header files that are required by function declaration
|
|
|
|
*******************************************************************/
|
|
|
|
#include <fstream>
|
|
|
|
|
|
|
|
/********************************************************************
|
|
|
|
* Function declaration
|
|
|
|
*******************************************************************/
|
|
|
|
/* namespace openfpga begins */
|
|
|
|
namespace openfpga {
|
|
|
|
|
|
|
|
bool valid_file_stream(std::fstream& fp);
|
|
|
|
|
|
|
|
void check_file_stream(const char* fname,
|
|
|
|
std::fstream& fp);
|
|
|
|
|
2020-02-15 16:03:00 -06:00
|
|
|
std::string format_dir_path(const std::string& dir_path_to_format);
|
|
|
|
|
|
|
|
std::string find_path_file_name(const std::string& file_name);
|
|
|
|
|
|
|
|
std::string find_path_dir_name(const std::string& file_name);
|
|
|
|
|
2020-04-08 13:55:09 -05:00
|
|
|
void create_directory(const std::string& dir_path, const bool& recursive = true);
|
2020-02-15 16:03:00 -06:00
|
|
|
|
2020-05-05 15:36:27 -05:00
|
|
|
bool write_space_to_file(std::fstream& fp,
|
|
|
|
const size_t& num_space);
|
|
|
|
|
2020-06-20 19:25:17 -05:00
|
|
|
bool write_tab_to_file(std::fstream& fp,
|
|
|
|
const size_t& num_tab);
|
|
|
|
|
2020-01-16 13:32:29 -06:00
|
|
|
} /* namespace openfpga ends */
|
|
|
|
|
|
|
|
#endif
|