cprover
Loading...
Searching...
No Matches
file_util.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module:
4
5Author: Daniel Kroening, kroening@kroening.com
6
7\*******************************************************************/
8
9
10#ifndef CPROVER_UTIL_FILE_UTIL_H
11#define CPROVER_UTIL_FILE_UTIL_H
12
13#include <string>
14
15// C++17 will allow us to use std::filesystem::path::remove_all
16void delete_directory(const std::string &path);
17
18// C++17 will allow us to use std::filesystem::current_path (for both get and
19// set)
21void set_current_path(const std::string &path);
22
23// C++17 will allow us to use std::filesystem::path(dir).append(file)
24std::string concat_dir_file(const std::string &directory,
25 const std::string &file_name);
26
27// C++17 will allow us to use std::filesystem::is_directory
28bool is_directory(const std::string &path);
29
33bool create_directory(const std::string &path);
34
38bool file_exists(const std::string &path);
39
40// Delete a file with given path
43bool file_remove(const std::string &path);
44
48void file_rename(const std::string &old_path, const std::string &new_path);
49
50#endif // CPROVER_UTIL_FILE_UTIL_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:563
void set_current_path(const std::string &path)
Set working directory.
Definition file_util.cpp:82
std::string get_current_working_directory()
Definition file_util.cpp:51
bool file_exists(const std::string &path)
Check whether file with given path exists.
bool is_directory(const std::string &path)
void delete_directory(const std::string &path)
deletes all files in 'path' and then the directory itself
bool file_remove(const std::string &path)
C++17 will allow us to use std::filesystem::remove.
bool create_directory(const std::string &path)
Create a directory with given path C++17 will allow us to use std::filesystem::create_directory.
void file_rename(const std::string &old_path, const std::string &new_path)
Rename a file.
std::string concat_dir_file(const std::string &directory, const std::string &file_name)