Header file containing functions for creating files and folders.
More...
#include <unistd.h>
#include <iostream>
#include <fstream>
#include <boost/filesystem.hpp>
#include "VCluster/VCluster.hpp"
Go to the source code of this file.
Header file containing functions for creating files and folders.
- Author
- Justina Stark
- Date
- December 2019
Definition in file PathsAndFiles.hpp.
◆ check_if_directory_exists()
static bool check_if_directory_exists |
( |
std::string |
path | ) |
|
|
static |
Checks if a directory already exists.
- Parameters
-
path | Std::string with path of directory for which existence should be checked. |
- Returns
- True, if directory exists, false if not.
Definition at line 85 of file PathsAndFiles.hpp.
◆ check_if_file_exists()
static bool check_if_file_exists |
( |
std::string |
path | ) |
|
|
static |
Checks if a file already exists.
- Parameters
-
path | Std::string with path of file for which existence should be checked. |
- Returns
- True, if file exists, false if not.
Definition at line 42 of file PathsAndFiles.hpp.
◆ create_directory_if_not_exist()
static void create_directory_if_not_exist |
( |
std::string |
path, |
|
|
bool |
silent = 0 |
|
) |
| |
|
static |
Creates a directory if not already existent.
- Parameters
-
path | Std::string that contains path including name of the folder that should be created. |
Definition at line 103 of file PathsAndFiles.hpp.
◆ create_file_if_not_exist()
static void create_file_if_not_exist |
( |
std::string |
path | ) |
|
|
static |
Creates a file if not already existent.
- Parameters
-
path | Std::string that contains path including filename of the file that should be created. |
Definition at line 66 of file PathsAndFiles.hpp.
◆ get_cwd()
static std::string get_cwd |
( |
| ) |
|
|
static |
Gets the current working directory and returns path as string.
- Returns
- Std::string of path to current working directory.
Definition at line 24 of file PathsAndFiles.hpp.