Rolling 20220910

This commit is contained in:
jomjol
2022-09-10 23:29:19 +02:00
parent 6759164c82
commit 64b472d6bc
8 changed files with 31 additions and 8 deletions

View File

@@ -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);

View File

@@ -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);