Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
fileystem.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2020 W. Traylor <wolfgang.traylor@senckenberg.de>
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
11#ifndef FAUNA_FILESYSTEM_H
12#define FAUNA_FILESYSTEM_H
13
14#include <string>
15
16namespace Fauna {
17
19
26void create_directories(const std::string path, const mode_t mode = 0755);
27
29
34bool directory_exists(const std::string path);
35
37
42bool file_exists(const std::string& path);
43
45
54void remove_directory(const std::string& path);
55
56} // namespace Fauna
57
58#endif // FAUNA_FILESYSTEM_H
Definition: average.h:16
bool directory_exists(const std::string path)
Check whether a folder in the filesystem exists.
Definition: fileystem.cpp:99
bool file_exists(const std::string &path)
Check whether a file in the filesystem exists.
Definition: fileystem.cpp:115
void create_directories(const std::string path, const mode_t mode=0755)
Create a folder including all its parent folders.
Definition: fileystem.cpp:21
void remove_directory(const std::string &path)
Delete a directory recursively.
Definition: fileystem.cpp:120