9 #ifndef IFW_CTD_FILE_HPP_
10 #define IFW_CTD_FILE_HPP_
71 std::string
ResolvePath(
const std::string& filename);
77 const std::string& extension =
"");
81 const std::string& extension);
128 std::string
FindFile(
const std::string& filename,
131 const bool exception =
true);
143 std::string
LoadFile(
const std::string& filename,
144 std::string* complete_filename =
nullptr,
154 void SaveFile(
const std::string& filename,
155 const std::string& buffer,
156 const bool overwrite =
true);
161 #endif // !IFW_CTD_FILE_HPP_
void RemoveFile(const std::string &filename)
Remove the referenced file, if it exists.
Definition: file.cpp:74
std::string ResDirNbToString(ResourceType type)
Convert resource type from number to string representation.
Definition: file.cpp:36
const std::string RES_CONFIG_STR
Definition: file.hpp:51
const std::string SYSROOT_STR
Definition: file.hpp:31
const std::string RES_DATA_STR
Definition: file.hpp:56
const std::string RES_MODEL_STR
Definition: file.hpp:54
const std::string RES_AUDIO_STR
Definition: file.hpp:52
RootType RootVarTypeStringToNb(const std::string &type)
Convert root type from string to number representation.
Definition: file.cpp:25
std::string ResolvePath(const std::string &filename)
Resolve the filename if it contains env. variables, "~" and relative paths.
Definition: file.cpp:126
std::string CreateIfwFilename(const std::string &filename, const RootType root, const ResourceType resource, const std::string &extension)
Create a resource path in the IFW deployment environment.
Definition: file.cpp:93
const std::string INTROOT_STR
Definition: file.hpp:32
ResourceType ResDirStringToNb(const std::string &type)
Convert resource type from string to number representation.
Definition: file.cpp:49
const std::string CFGPATH_STR
Definition: file.hpp:34
const std::string RES_DICTIONARY_STR
Definition: file.hpp:55
const std::string DATAROOT_STR
Definition: file.hpp:33
RootType
Types of ELT deployment environment roots.
Definition: file.hpp:21
std::string RootVarTypeNbToString(RootType type)
Convert root type from number to string representation.
Definition: file.cpp:15
std::string CheckAddExtension(const std::string &filename, const std::string &extension)
Check if filename has the specified extension (no initiating dot). If not, add it.
Definition: file.cpp:62
const std::string RES_DIR
Definition: file.hpp:50
const std::string RES_IMAGE_STR
Definition: file.hpp:53
ResourceType
Definition: file.hpp:38
std::string FindFile(const std::string &filename, RootType roots, int32_t resources, const bool exception)
Locate file in the locations defined by the ELT ICS deployment environment.
Definition: file.cpp:156
void SaveFile(const std::string &filename, const std::string &buffer, const bool overwrite)
Save the contents inthe buffer into the given filename.
Definition: file.cpp:267
std::string LoadFile(const std::string &filename, std::string *complete_filename, RootType roots, ResourceType resources)
Load a file and return the content.
Definition: file.cpp:242