CoolProp  6.6.0
An open-source fluid property and humid air property database
Functions
CPfilepaths.h File Reference
#include <string>
#include <vector>

Go to the source code of this file.

Functions

std::string get_separator (void)
 Get directory separator. More...
 
std::string get_home_dir (void)
 Get the user's home directory; It is believed that is is always a place that files can be written. More...
 
bool path_exists (const std::string &path)
 Return true if path exists. More...
 
std::string join_path (const std::string &one, const std::string &two)
 Return merged path, append separator if string two is empty. More...
 
void make_dirs (std::string file_path)
 Make directory and all required intermediate directories. More...
 
unsigned long long CalculateDirSize (const std::string &path)
 Get the size of a directory in bytes. More...
 
std::string get_file_contents (const char *filename)
 
std::vector< char > get_binary_file_contents (const char *filename)
 Get all the contents of a binary file. More...
 

Function Documentation

◆ CalculateDirSize()

unsigned long long CalculateDirSize ( const std::string &  path)

Get the size of a directory in bytes.

Definition at line 80 of file CPfilepaths.cpp.

◆ get_binary_file_contents()

std::vector<char> get_binary_file_contents ( const char *  filename)

Get all the contents of a binary file.

Definition at line 90 of file CPfilepaths.cpp.

◆ get_file_contents()

std::string get_file_contents ( const char *  filename)

Definition at line 239 of file CPfilepaths.cpp.

◆ get_home_dir()

std::string get_home_dir ( void  )

Get the user's home directory; It is believed that is is always a place that files can be written.

Definition at line 152 of file CPfilepaths.cpp.

◆ get_separator()

std::string get_separator ( void  )

Get directory separator.

Definition at line 140 of file CPfilepaths.cpp.

◆ join_path()

std::string join_path ( const std::string &  one,
const std::string &  two 
)

Return merged path, append separator if string two is empty.

Definition at line 227 of file CPfilepaths.cpp.

◆ make_dirs()

void make_dirs ( std::string  file_path)

Make directory and all required intermediate directories.

Definition at line 104 of file CPfilepaths.cpp.

◆ path_exists()

bool path_exists ( const std::string &  path)

Return true if path exists.

Definition at line 196 of file CPfilepaths.cpp.