printf(New_folder_path, "a:\\%s",New_folder_name );
//sprintf(New_File_path, "a:\\%s\\%s",New_folder_name,"no_log" );
sprintf(New_File_path, "a:\\%s\\%s",folder_name,"yes_log" );
rename_etruct.OLD_PATHNAME = Old_path;
rename_etruct.NEW_PATHNAME = New_path;
error_code = ioctl(filesystem_handle, IO_IOCTL_RENAME_FILE,&rename_etruct);
Thank you iva for your reply. i have already gone through that PDF but i cant find any solution .... i want to create a folder in SDCard with name ".fsevent" and a file within that folder. i could create that folder, but could not open folder and create a file ... but everything works fine if i change ist name to "fsevent". can't we start a directory name with a DOT???
Hi Abhijith S,
You cannot rename folder and file together. When you want rename file (to another folder), you must delete it or use move or something else.
You can call IO_IOCTL_DELETE_FILE in old file.
A file is moved if the directory paths are different and the file names are the same. A file is renamed if the directory paths are the same and the file names are different.
A directory can be renamed, but cannot be moved.
Please, see documentation Freescale MQX™ RTOS MFS User’s Guide for Kinetis Software Development Kit (KSDK)
all commands are described here.