The f_getcwd function retrieves the current directory.
FRESULT f_getcwd ( TCHAR* Buffer, /* Pointer to the buffer */ UINT BufferLen /* The length of the buffer */ );
The f_getcwd function retrieves the current directory of the current drive in full path string including drive number.
Available when _FS_RPATH == 2.