Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Homepage FreeRTOS+ Products FreeRTOS Labs Integration Services Contact / Enquiries

f_getcwd()

[FreeRTOS Embedded File System API]

header_file.h
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.

Returns:
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


[ Back to the top ]    [ About FreeRTOS ]    [ FreeRTOS+ Sitemap ]    [ Main FreeRTOS Sitemap ]    [ ]


Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.