CBMC
|
#include <string>
Go to the source code of this file.
Functions | |
void | delete_directory (const std::string &path) |
deletes all files in 'path' and then the directory itself More... | |
std::string | get_current_working_directory () |
void | set_current_path (const std::string &path) |
Set working directory. More... | |
std::string | concat_dir_file (const std::string &directory, const std::string &file_name) |
bool | is_directory (const std::string &path) |
bool | create_directory (const std::string &path) |
Create a directory with given path C++17 will allow us to use std::filesystem::create_directory. More... | |
bool | file_exists (const std::string &path) |
Check whether file with given path exists. More... | |
bool | file_remove (const std::string &path) |
C++17 will allow us to use std::filesystem::remove. More... | |
void | file_rename (const std::string &old_path, const std::string &new_path) |
Rename a file. More... | |
std::string concat_dir_file | ( | const std::string & | directory, |
const std::string & | file_name | ||
) |
Definition at line 159 of file file_util.cpp.
bool create_directory | ( | const std::string & | path | ) |
Create a directory with given path C++17 will allow us to use std::filesystem::create_directory.
Definition at line 212 of file file_util.cpp.
void delete_directory | ( | const std::string & | path | ) |
deletes all files in 'path' and then the directory itself
Definition at line 118 of file file_util.cpp.
bool file_exists | ( | const std::string & | path | ) |
Check whether file with given path exists.
C++17 will allow us to use std::filesystem::directory_entry(file).exists()
Definition at line 222 of file file_util.cpp.
bool file_remove | ( | const std::string & | path | ) |
C++17 will allow us to use std::filesystem::remove.
Definition at line 231 of file file_util.cpp.
void file_rename | ( | const std::string & | old_path, |
const std::string & | new_path | ||
) |
Rename a file.
C++17 will allow us to use std::filesystem::rename Throws an exception on failure.
Definition at line 240 of file file_util.cpp.
std::string get_current_working_directory | ( | ) |
Definition at line 51 of file file_util.cpp.
bool is_directory | ( | const std::string & | path | ) |
Definition at line 187 of file file_util.cpp.
void set_current_path | ( | const std::string & | path | ) |
Set working directory.
path | New working directory to change to |
Definition at line 82 of file file_util.cpp.