KrisLibrary  1.0.0
fileutils.h
Go to the documentation of this file.
1 #ifndef UTILS_FILEUTILS_H
2 #define UTILS_FILEUTILS_H
3 
4 #include <stdlib.h>
5 #include <string>
6 #include <vector>
7 
18 
19 namespace FileUtils {
20 
21 void SafeFileName(char* str);
22 std::string SafeFileName(const std::string& str);
23 
25 bool Exists(const char* fn);
26 
28 bool Delete(const char* fn);
29 
31 bool Rename(const char* from,const char* to);
32 
34 bool Copy(const char* from,const char* to);
35 
38 bool TempName(char* out,const char* directory=NULL,const char* prefix=NULL);
39 
41 bool IsDirectory(const char* path);
42 
44 bool MakeDirectory(const char* path);
45 
48 bool MakeDirectoryRecursive(const char* path);
49 
51 bool ListDirectory(const char* path,std::vector<std::string>& items);
52 
54 std::string GetWorkingDirectory();
55 
56 } //namespace FileUtils
57 
60 #endif
Definition: fileutils.cpp:25