Real time embedded FreeRTOS RSS feed 
Homepage FreeRTOS+ Products FreeRTOS Labs Support Forum 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 ]    [ Privacy ]    [ FreeRTOS+ Sitemap ]    [ Main FreeRTOS Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.