cprover
file_util.h File Reference
#include <string>
Include dependency graph for file_util.h:
This graph shows which files directly or indirectly include this file:

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 ()
 
std::string concat_dir_file (const std::string &directory, const std::string &file_name)
 
bool is_directory (const std::string &path)
 

Function Documentation

◆ concat_dir_file()

std::string concat_dir_file ( const std::string &  directory,
const std::string &  file_name 
)
parameters: directory name and file name
Returns
concatenation of directory and file, if the file path is relative

Definition at line 134 of file file_util.cpp.

Referenced by compilet::add_files_from_archive(), add_to_json(), source_locationt::as_string(), compilet::compile(), json_output_function(), list_eloc(), list_functions(), temp_dirt::operator()(), and xml_output_function().

◆ delete_directory()

void delete_directory ( const std::string &  path)

deletes all files in 'path' and then the directory itself

Definition at line 95 of file file_util.cpp.

References delete_directory(), and utf8_to_utf16_native_endian().

Referenced by temp_dirt::clear(), delete_directory(), and compilet::~compilet().

◆ get_current_working_directory()

std::string get_current_working_directory ( )
Returns
current working directory

Definition at line 45 of file file_util.cpp.

References CHECK_RETURN, free(), and INVARIANT.

Referenced by compilet::compilet(), load_java_class(), parsert::set_file(), and temp_working_dirt::temp_working_dirt().

◆ is_directory()

bool is_directory ( const std::string &  path)

Definition at line 147 of file file_util.cpp.

References widen().

Referenced by ms_cl_modet::doit().