9 char NewRecName[MAX_FILE_NAME_SIZE + 1];
14 if(FileName && *FileName &&
HDD_Exist(FileName))
16 memset(NewRecName, 0,
sizeof(NewRecName));
25 Slash = strrchr(FileName,
'/');
30 i = (dword)Slash - (dword)FileName + 1;
31 strncpy(Path, FileName, i);
33 strcpy(NewRecName, Slash + 1);
38 strcpy(NewRecName, FileName);
45 StrMkUTF8(NewRecName,
sizeof(NewRecName), 9);
51 if(*Path)
InsertAt(NewRecName, 0, Path);
53 if(!strcmp(FileName, NewRecName))
62 strcpy(FileName, NewRecName);
bool FixInvalidFileName(char *FileName)
bool HDD_Exist(const char *FileName)
bool HDD_Rename(const char *FileName, const char *NewFileName)
tFileInUse HDD_isFileInUse(const char *FileName)
void MakeUniqueFileName(char *FileName)
bool StrMkUTF8(byte *SourceString, size_t SourceSize, byte DefaultISO8859CharSet)
void MakeValidFileName(char *strName, eRemoveChars ControlCharacters)
void InsertAt(const char *SourceString, int Pos, char *NewString)