My folder structure is like this : I open a folder then I use f_chdir to change my directory to that folder. The problem is that f_chdir doesn't change my Directory Structure variable.
-A1
| A11
| |
| A11.mp3
| A12
| |
| A12.mp3
| A1.mp3
-A2
| A21
| |
| A21.mp3
| A22
| |
| A22.mp3
| A2.mp3
root_path = "/A1";
newPath = "/A1/A11";
f_opendir(dir,root_path );
f_chdir(newPath);
f_readdir(dir,fno);// This results in fno.fname = "/A12"
How can I change:
f_readdir(dir,fno);// This results in fno.fname = "/A12"
to this behavior?:
f_readdir(dir,fno);// Resulting in fno.fname = "A11.mp3"