CoolProp
6.6.1dev
An open-source fluid property and humid air property database
|
#include "PlatformDetermination.h"
#include "Exceptions.h"
#include "CPfilepaths.h"
#include "CPstrings.h"
#include "CoolPropTools.h"
#include <fstream>
#include <algorithm>
#include <sys/types.h>
#include <sys/stat.h>
#include <cerrno>
#include <unistd.h>
#include <pwd.h>
#include <ftw.h>
#include <stdint.h>
#include <iostream>
Go to the source code of this file.
Macros | |
#define | NOMINMAX |
Functions | |
int | ftw_function (const char *fpath, const struct stat *sb, int tflag, struct FTW *ftwbuf) |
unsigned long long | CalculateDirSize (const std::string &path) |
Get the size of a directory in bytes. More... | |
std::vector< char > | get_binary_file_contents (const char *filename) |
Get all the contents of a binary file. More... | |
void | make_dirs (std::string file_path) |
Make directory and all required intermediate directories. More... | |
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... | |
std::string | get_file_contents (const char *filename) |
#define NOMINMAX |
Definition at line 15 of file CPfilepaths.cpp.
unsigned long long CalculateDirSize | ( | const std::string & | path | ) |
Get the size of a directory in bytes.
Definition at line 80 of file CPfilepaths.cpp.
int ftw_function | ( | const char * | fpath, |
const struct stat * | sb, | ||
int | tflag, | ||
struct FTW * | ftwbuf | ||
) |
Definition at line 76 of file CPfilepaths.cpp.
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.
std::string get_file_contents | ( | const char * | filename | ) |
Definition at line 239 of file CPfilepaths.cpp.
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.
std::string get_separator | ( | void | ) |
Get directory separator.
Definition at line 140 of file CPfilepaths.cpp.
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.
void make_dirs | ( | std::string | file_path | ) |
Make directory and all required intermediate directories.
Definition at line 104 of file CPfilepaths.cpp.
bool path_exists | ( | const std::string & | path | ) |
Return true if path exists.
Definition at line 196 of file CPfilepaths.cpp.