f_chdir


Use this function to change the current working directory.

Format

int f_chdir ( const char * path )

Arguments

Argument Description Type
path The name of the target directory. const char *

Return values

Return value Description
F_NOERR Successful execution.
Else See Error Codes.

Example

void myfunc( void )
{
        .
        .
    f_mkdir( "subfolder" );
    f_chdir( "subfolder" );   /* Change directory */
    f_mkdir( "sub2" );
    f_chdir( ".." );          /* Go upward */       
    f_chdir( "subfolder/sub2" );  /* Go into directory sub2 */
        .
        .
}