[ ]
Real time embedded FreeRTOS mailing list 
Homepage FreeRTOS Labs FreeRTOS+TCP FreeRTOS+FAT FreeRTOS+POSIX Contact / Enquiries

FreeRTOS+FAT is still in the lab
FreeRTOS+FAT is already in use in commercial products and we encourage you to try it yourself. Be aware however that FreeRTOS+FAT was acquired by Real Time Engineers Ltd., and is still being documented and updated to ensure it meets our strict quality standards. Please use the forum for support, or contact us directly if you have a specific business interest.


[FreeRTOS+FAT Standard API Reference]

char *ff_getcwd( char *pcBuffer, size_t xBufferLength );

Writes the name of the current working directory (CWD) to the buffer pointed to by pcBuffer. The name is written as a standard null terminated C string.


pcBuffer   A pointer to the buffer into which the name of the current working directory will be written.

xBufferLength   The size (in bytes) of the buffer pointed to by pcBuffer;


If the current working directory name was successfully written to pcBuffer then pcBuffer is returned. Otherwise NULL is returned.

Example usage:

void vExampleFunction( void )
char pcBuffer[ 50 ];

    /* Create a sub directory called subfolder, and sub directory within
    subfolder called sub1. */
    ff_mkdir( "subfolder" );
    ff_mkdir( "subfolder/sub1" );

    /* Move into subfolder/sub1. */
    ff_chdir( "subfolder/sub1" );

    /* Print out the current working directory - it should be
    "subfolder/sub1". */
    ff_getcwd( pcBuffer, sizeof( pcBuffer ) );
    printf( "%s", pcBuffer );
Example use of the ff_getcwd() API function to open or create a file

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ FreeRTOS Labs Sitemap ]    [ Main FreeRTOS Sitemap ]    [ ]

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