OGS 6.2.1-599-g427777a38.dirty.20191113164234
FileTools.h File Reference

Detailed Description

Filename manipulation routines.

Lars Bilke
Apr. 2010

Definition in file FileTools.h.

#include <fstream>
#include <string>
#include <vector>
#include <logog/include/logog.hpp>
Include dependency graph for FileTools.h:

Go to the source code of this file.


 Functionality to build different search length algorithm objects from given config.


bool BaseLib::IsFileExisting (const std::string &strFilename)
 Returns true if given file exists. From http://www.techbytes.ca/techbyte103.html. More...
template<typename T >
void BaseLib::writeValueBinary (std::ostream &out, T const &val)
 write value as binary into the given output stream More...
template<typename T >
BaseLib::swapEndianness (T const &v)
double BaseLib::swapEndianness (double const &v)
template<typename T >
BaseLib::readBinaryValue (std::istream &in)
template<typename T >
std::vector< T > BaseLib::readBinaryArray (std::string const &filename, std::size_t const n)
void BaseLib::truncateFile (std::string const &filename)
 truncate a file More...
std::string BaseLib::extractBaseName (std::string const &pathname)
std::string BaseLib::extractBaseNameWithoutExtension (std::string const &pathname)
std::string BaseLib::getFileExtension (const std::string &path)
bool BaseLib::hasFileExtension (std::string const &extension, std::string const &filename)
std::string BaseLib::dropFileExtension (std::string const &filename)
std::string BaseLib::copyPathToFileName (const std::string &file_name, const std::string &source)
std::string BaseLib::extractPath (std::string const &pathname)
std::string BaseLib::appendPathSeparator (std::string const &path)
std::string BaseLib::joinPaths (std::string const &pathA, std::string const &pathB)
std::string const & BaseLib::getProjectDirectory ()
 Returns the directory where the prj file resides. More...
void BaseLib::setProjectDirectory (std::string const &dir)
 Sets the project directory. More...
void BaseLib::removeFiles (std::vector< std::string > const &files)