This site required JavaScript
to be enabled. Click here to
view a static menu.
char *ff_getcwd( char *pcBuffer, size_t xBufferLength );
Writes the name of the current working directory (CWD) to the buffer pointed to by pcBuffer. The name is written as a standard null terminated C string.
Parameters:
If the current working directory name was successfully written to pcBuffer then pcBuffer is returned. Otherwise NULL is returned.
Example usage:
void vExampleFunction( void )
{
char pcBuffer[ 50 ];
/* Create a sub directory called subfolder, and sub directory within
subfolder called sub1. */
ff_mkdir( "subfolder" );
ff_mkdir( "subfolder/sub1" );
/* Move into subfolder/sub1. */
ff_chdir( "subfolder/sub1" );
/* Print out the current working directory - it should be
"subfolder/sub1". */
ff_getcwd( pcBuffer, sizeof( pcBuffer ) );
printf( "%s", pcBuffer );
}