unsigned char f_getcwd( char *pcBuffer, int iBufferLength );
Obtain the name of the current working directory.
Parameters:
| pcBuffer |
The buffer into which the name of the current working
directory will be stored (as a standard C null terminated
string).
|
| iBufferLength |
The size (in bytes) of the buffer pointed to by the
pcBuffer parameter.
|
| F_NO_ERROR |
The name of the current working directory was copied into
pcBuffer.
|
| Any other value |
The name of the current directory was not copied into
pcBuffer. The return value holds the error code.
|
See also
f_mkdir(), f_rmdir(), f_chdir(). Example usage:
void vExampleFunction( void ) { char pcBuffer[ 100 ]; unsigned char ucReturnValue; ucReturnValue = f_getcwd( pcBuffer, sizeof( pcBuffer ) ); if( ucReturnValue != F_NO_ERROR ) { /* The name of the current working directory was not copied into pcBuffer. ucReturnValue holds the error code. */ } else { /* The name of the current working directory was copied into pcBuffer. */ } } Example use of the f_getcwd() API function