Download FreeRTOS
 

Quality RTOS & Embedded Software

LIBRARIES
WHAT'S NEW
Simplifying Authenticated Cloud Connectivity for Any Device.
Designing an energy efficient and cloud-connected IoT solution with CoAP.
Introducing FreeRTOS Kernel version 11.0.0:
FreeRTOS Roadmap and Code Contribution process.
OPC-UA over TSN with FreeRTOS.

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
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.