ug4
file_util.h File Reference

File utility functions. More...

#include <fstream>
#include <vector>
#include <string>
#include "common/ug_config.h"

Go to the source code of this file.

Namespaces

 ug
 the ug namespace
 

Functions

UG_API void ug::ChangeDirectory (std::string dir)
 Changes the current directory. More...
 
UG_API bool ug::CreateDirectory (const char *directory)
 Creates a directory. More...
 
UG_API bool ug::CreateDirectory (const char *directory, int mode)
 Creates a directory. More...
 
static bool ug::CreateDirectory (std::string directory)
 Creates a directory. More...
 
UG_API bool ug::CreateDirectoryTMP (const char *directory)
 Creates a directory. More...
 
std::string ug::CurrentWorkingDirectory ()
 
UG_API bool ug::DirectoryExists (const char *dirname)
 Checks the existence of a given directory. More...
 
static bool ug::DirectoryExists (std::string filename)
 
UG_API bool ug::FileCompare (const char *file1, const char *file2)
 !!! Serial i/o version !!! More...
 
UG_API bool ug::FileExists (const char *filename)
 !!! Serial i/o version !!! More...
 
static bool ug::FileExists (std::string filename)
 
UG_API size_t ug::FileSize (const char *filename)
 Returns size of the specified file in bytes. More...
 
static size_t ug::FileSize (std::string filename)
 
bool ug::FileTypeIs (const char *filename, const char *extension)
 !!! Serial i/o version !!! More...
 
std::string ug::FindDirInStandardPaths (const char *dirname)
 searches the directory in the standard paths. More...
 
std::string ug::FindFileInStandardPaths (const char *filename)
 searches the file in the standard paths. More...
 
UG_API bool ug::GetDirectoriesInDirectory (std::vector< std::string > &dirsOut, const char *dir)
 Returns a list of all directories in a directory. More...
 
UG_API bool ug::GetFilesInDirectory (std::vector< std::string > &filesOut, const char *dir)
 Returns a list of all files in a directory. More...
 
UG_API std::string ug::GetTmpPath ()
 Returns a path to which an application may write temporary files. More...
 
UG_API std::string ug::MakeTmpFile (std::string filename, const std::string &extension, bool &bSuccess)
 
UG_API bool ug::ReadFile (const char *filename, std::vector< char > &file, bool bText)
 

Detailed Description

File utility functions.

Date
2012-05-15

Utility function, which depend on functionality specific to operating systems are implemented in common/os_dependent/file_util_*.cpp