mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-16 08:26:52 +03:00
Rolling 20220910
This commit is contained in:
@@ -268,14 +268,26 @@ string getFileFullFileName(string filename)
|
||||
if (lastpos == string::npos)
|
||||
return "";
|
||||
|
||||
printf("Last position: %d\n", lastpos);
|
||||
// printf("Last position: %d\n", lastpos);
|
||||
|
||||
string zw = filename.substr(lastpos + 1, filename.size() - lastpos);
|
||||
// zw = toUpper(zw);
|
||||
|
||||
return zw;
|
||||
}
|
||||
|
||||
string getDirectory(string filename)
|
||||
{
|
||||
size_t lastpos = filename.find('/');
|
||||
|
||||
if (lastpos == string::npos)
|
||||
return "";
|
||||
|
||||
// printf("Directory: %d\n", lastpos);
|
||||
|
||||
string zw = filename.substr(0, lastpos - 1);
|
||||
return zw;
|
||||
}
|
||||
|
||||
string getFileType(string filename)
|
||||
{
|
||||
size_t lastpos = filename.find(".", 0);
|
||||
|
||||
@@ -21,6 +21,7 @@ bool ctype_space(const char c, string adddelimiter);
|
||||
|
||||
string getFileType(string filename);
|
||||
string getFileFullFileName(string filename);
|
||||
string getDirectory(string filename);
|
||||
|
||||
int mkdir_r(const char *dir, const mode_t mode);
|
||||
int removeFolder(const char* folderPath, const char* logTag);
|
||||
|
||||
Reference in New Issue
Block a user