2 #ifndef comfrm_FileWorking_stlH
3 #define comfrm_FileWorking_stlH
70 #define BOOST_FILESYSTEM_NO_DEPRECATED
71 #define BOOST_FILESYSTEM_VERSION 3
73 #include "stringtools.h"
78 #include <boost/filesystem.hpp>
79 #include <boost/filesystem/path.hpp>
97 int seekStreamTo(FS& p_fstream,
const char* p_keyword)
105 if (strstr(strbuf,p_keyword)>0)
111 while(!p_fstream.eof());
123 MAC_DLLEXPORT std::string getCurrentModuleFullFilename(HMODULE p_module=NULL);
132 MAC_DLLEXPORT std::string getCurrentModuleName(HMODULE p_module=NULL);
168 MAC_DLLEXPORT std::string
getFullPath(
const std::string& p_relative_path,
const std::string& p_filename=
"");
191 MAC_DLLEXPORT
bool fileExists(
const std::string& p_fullFilename);
196 MAC_DLLEXPORT
bool libExists(
const std::string& p_fullLibPath);
209 int p_not_existent_id,
211 const std::string& p_extension);
236 MAC_DLLEXPORT
bool fileGetLine(std::ifstream& is, std::string& line);
242 MAC_DLLEXPORT std::string
slash();
255 MAC_DLLEXPORT std::string
toNativeSlash(
const std::string& p_path );
258 class FilenameEqual:
public std::unary_function< boost::filesystem::path, bool >
261 explicit FilenameEqual(
const boost::filesystem::path& fname): mFilename(fname) { }
263 bool operator()(
const boost::filesystem::directory_entry& entry)
const
265 return entry.path().filename() == mFilename;
269 boost::filesystem::path mFilename;
275 #endif // unt_FileWorking_stlH
MAC_DLLEXPORT std::string getFileExtension(const std::string &p_filename)
MAC_DLLEXPORT std::string getFilenameWOPath(const std::string &p_path)
Definition: filetools.cpp:159
Definition: filetools.h:258
MAC_DLLEXPORT std::string getPluginsFullPath()
Definition: filetools.cpp:262
MAC_DLLEXPORT std::string getFullPathByRelativeDir(const std::string &p_rel_dir)
MAC_DLLEXPORT std::string getXMLFullPath()
Definition: filetools.cpp:349
MAC_DLLEXPORT bool libExists(const std::string &p_fullLibPath)
Definition: filetools.cpp:361
MAC_DLLEXPORT std::string getPythonScriptsFullPath()
Definition: filetools.cpp:268
MAC_DLLEXPORT bool fileGetLine(std::ifstream &is, std::string &line)
Definition: filetools.cpp:391
MAC_DLLEXPORT std::string toNativeSlash(const std::string &p_path)
Definition: filetools.cpp:433
MAC_DLLEXPORT std::string getHostModuleFullPath()
Definition: filetools.cpp:181
MAC_DLLEXPORT std::string createResultFilename(const std::string &p_name, char p_separator, int p_not_existent_id, int p_digits, const std::string &p_extension)
MAC_DLLEXPORT std::string getExternalBinariesFullPath()
Definition: filetools.cpp:274
MAC_DLLEXPORT std::string getPathWOFilename(const std::string &p_path)
MAC_DLLEXPORT std::string getStrFormatedCode(int p_id, int p_format_length)
Definition: filetools.cpp:228
MAC_DLLEXPORT std::string slash()
Definition: filetools.cpp:417
MAC_DLLEXPORT std::string getFilenameWOExtension(const std::string &p_filename)
MAC_DLLEXPORT std::string getCFGFullPath()
Definition: filetools.cpp:343
MAC_DLLEXPORT std::string nativeSlash()
Definition: filetools.cpp:423
MAC_DLLEXPORT bool fileExists(const std::string &p_fullFilename)
MAC_DLLEXPORT std::string getFullPath(const std::string &p_relative_path, const std::string &p_filename="")