SPRUI04F july 2015 – april 2023
Rename File
int DEV_rename (const char *old_name , const char *new_name );
This function changes the name associated with the file.
This function must return -1 to indicate an error if for some reason the file could not be renamed, such as the file does not exist, or the new name already exists.
It is inadvisable to allow renaming a file so that it is on a different device. In general this would require a whole file copy, which may be more expensive than you expect.
If successful, this function returns 0.