Flow123d
JS_before_hm-2152-gf87f4aac4
|
Go to the documentation of this file.
35 namespace filesystem {
62 DECLARE_EXCEPTION( ExcFileOpen, <<
"Can not open file: " << EI_Path::qval <<
"\nAt input address: " << EI_Address_String::qval );
63 DECLARE_EXCEPTION( ExcAbsOutputPath, <<
"Can not set absolute path " << EI_Path::qval <<
" for an output file." );
64 DECLARE_EXCEPTION( ExcMkdirFail, <<
"Can not create directory: " << EI_Path::qval );
88 FilePath(
string file_path,
const FileType ft);
107 static void set_io_dirs(
const string working_dir,
const string root,
const string input,
const string output);
117 static void set_dirs(
const string root,
const string input,
const string output);
129 static string set_dirs_from_input(
const string main_yaml,
const string input,
const string output);
134 operator string()
const;
150 static void add_placeholder(
string key,
string value);
155 static const string get_absolute_working_dir();
165 void create_output_dir();
170 string parent_path()
const;
175 string filename()
const;
185 string extension()
const;
190 string cut_extension()
const;
197 template <
class Stream>
198 void open_stream(Stream &stream)
const;
209 static void create_dir(
const boost::filesystem::path &dir);
214 void substitute_value(
string &path);
223 static string convert_for_check_absolute(
string path);
239 static std::shared_ptr<boost::filesystem::path>
root_dir;
FileType
Possible types of file.
static std::map< string, string > placeholder
dictionary of placeholders
static std::shared_ptr< boost::filesystem::path > root_dir
Prefix path for input files (directory of the main input file).
static constexpr bool value
Dedicated class for storing path to input and output files.
std::shared_ptr< boost::filesystem::path > abs_file_path_
Final absolute path to the file.
#define TYPEDEF_ERR_INFO(EI_Type, Type)
Macro to simplify declaration of error_info types.
static std::shared_ptr< boost::filesystem::path > output_dir
Prefix path for output files.
FileType file_type_
File type.
#define DECLARE_EXCEPTION(ExcName, Format)
Macro for simple definition of exceptions.
bool operator==(const Null &, const Null &)
std::ostream & operator<<(std::ostream &stream, const FilePath &fp)
Allow redirect FilePath to stream.