[FreeRTOS Embedded File System API]

unsigned char f_chdir( const char *pcDirectoryName );

Change the working directory in the embedded FAT file system.


pcDirectoryName   The name of the target directory.

F_NO_ERROR   The current directory was changed to pcDirectoryName.

Any other value   The current directory was not changed. The return value holds the error code.

See also

f_mkdir(), f_rmdir(), f_getcwd().

Example usage:

void vExampleFunction( void )
/* Create a sub directory called subfolder. */
f_mkdir( “subfolder” );

/* Change the working directory to the newly created directory. */
f_chdir( “subfolder” );

Example use of the f_chdir() API function