cphot 0.1
A C++ tool for computing photometry from spectra.
utils Namespace Reference

Functions

bool file_exists (const std::string &name)
 Check if a file exists regardless of types. More...
 
bool folder_exists (std::string foldername)
 Checks if a folder exists. More...
 
int _mkdir (const char *path)
 Portable wrapper for mkdir. More...
 
int mkdir (const char *path)
 Recursive, portable wrapper for mkdir. More...
 

Function Documentation

◆ _mkdir()

int utils::_mkdir ( const char *  path)

Portable wrapper for mkdir.

Internally used by mkdir()

Parameters
[in]paththe full path of the directory to create.
Returns
zero on success, otherwise -1.

Definition at line 85 of file helpers.hpp.

◆ file_exists()

bool utils::file_exists ( const std::string &  name)
inline

Check if a file exists regardless of types.

Parameters
namefilename and path to check
Returns
whether the file exists

Definition at line 63 of file helpers.hpp.

◆ folder_exists()

bool utils::folder_exists ( std::string  foldername)

Checks if a folder exists.

Parameters
foldernamepath to the folder to check.
Returns
true if the folder exists, false otherwise.

Definition at line 73 of file helpers.hpp.

◆ mkdir()

int utils::mkdir ( const char *  path)

Recursive, portable wrapper for mkdir.

Parameters
[in]paththe full path of the directory to create.
Returns
zero on success, otherwise -1.

Definition at line 103 of file helpers.hpp.