29 bool fileExists =
false;
44 fopen_s(&fp, filePath.c_str(),
"rb");
46 fp = fopen(filePath.c_str(),
"rb");
53 fseek(fp , 0 , SEEK_END);
62 return remove(filePath.c_str());
66 const std::string &newFilePath)
68 return ::rename(oldFilePath.c_str(), newFilePath.c_str());
73 std::string fullPath = filePath;
75 for(
int i=(
int)fullPath.size()-1; i>=0; --i)
77 if(fullPath[i] ==
'/' || fullPath[i] ==
'\\')
83 name.insert(name.begin(), fullPath[i]);
91 std::list<std::string> list =
uSplit(filePath,
'.');
static int erase(const std::string &filePath)
std::string getExtension()
Wrappers of STL for convenient functions.
std::list< std::string > uSplit(const std::string &str, char separator=' ')
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)
static int rename(const std::string &oldFilePath, const std::string &newFilePath)