41 #ifndef __H__UG__FILE_UTIL__
42 #define __H__UG__FILE_UTIL__
112 static inline size_t FileSize( std::string filename)
200 UG_API bool ReadFile(
const char* filename, std::vector<char> &file,
bool bText);
UG_API bool FileCompare(const char *file1, const char *file2)
!!! Serial i/o version !!!
Definition: file_util.cpp:95
UG_API bool FileExists(const char *filename)
!!! Serial i/o version !!!
Definition: file_util.cpp:53
UG_API void ChangeDirectory(std::string dir)
Changes the current directory.
Definition: file_util_posix.cpp:164
UG_API bool CreateDirectory(const char *directory)
Creates a directory.
Definition: file_util_posix.cpp:149
bool FileTypeIs(const char *filename, const char *extension)
!!! Serial i/o version !!!
Definition: file_util.cpp:86
UG_API bool CreateDirectoryTMP(const char *directory)
Creates a directory.
Definition: file_util_posix.cpp:144
UG_API bool GetFilesInDirectory(std::vector< std::string > &filesOut, const char *dir)
Returns a list of all files in a directory.
Definition: file_util_posix.cpp:115
UG_API size_t FileSize(const char *filename)
Returns size of the specified file in bytes.
Definition: file_util_posix.cpp:54
UG_API std::string GetTmpPath()
Returns a path to which an application may write temporary files.
Definition: file_util_posix.cpp:159
std::string FindDirInStandardPaths(const char *dirname)
searches the directory in the standard paths.
Definition: file_util.cpp:218
std::string FindFileInStandardPaths(const char *filename)
searches the file in the standard paths.
Definition: file_util.cpp:196
std::string CurrentWorkingDirectory()
Definition: file_util_posix.cpp:171
UG_API bool DirectoryExists(const char *dirname)
Checks the existence of a given directory.
Definition: file_util_posix.cpp:74
UG_API bool GetDirectoriesInDirectory(std::vector< std::string > &dirsOut, const char *dir)
Returns a list of all directories in a directory.
Definition: file_util_posix.cpp:86
bool ReadFile(const char *filename, vector< char > &file, bool bText)
Definition: file_util.cpp:151
#define UG_API
Definition: ug_config.h:65
string MakeTmpFile(string filename, const string &extension, bool &bSuccess)
!!! Serial i/o version !!!
Definition: file_util.cpp:177