DBG: added FileHelper::GetFileName
This commit is contained in:
parent
45ddde5707
commit
6856990cc1
|
@ -96,4 +96,10 @@ bool FileHelper::ReadAllLines(const String & fileName, std::vector<String> & lin
|
|||
if(line.length())
|
||||
lines.push_back(line);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
String FileHelper::GetFileName(const String & fileName)
|
||||
{
|
||||
auto last = strrchr(fileName.c_str(), '\\');
|
||||
return last ? last + 1 : fileName;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ public:
|
|||
static bool ReadAllText(const String & fileName, String & content);
|
||||
static bool WriteAllText(const String & fileName, const String & content);
|
||||
static bool ReadAllLines(const String & fileName, std::vector<String> & lines, bool keepEmpty = false);
|
||||
static String GetFileName(const String & fileName);
|
||||
};
|
||||
|
||||
#endif //_FILEREADER_H
|
Loading…
Reference in New Issue