[ ]
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.

ff_rmdir()

[FreeRTOS+FAT Standard API Reference]

ff_stdio.h
int ff_rmdir( const char *pcPath );
		

Remove a directory from the embedded FAT file system. A directory can only be removed if it does not contain any files.

Parameters:

pcDirectory   A pointer to a standard null terminated C string that holds the name of the directory being removed. The string can include a relative path.

Returns:

If the directory was removed successfully then zero is returned.

If the directory could not be removed then -1 is returned and the task's errno is set to indicate the reason. A task can obtain its errno value using the ff_errno() API function.

Example usage:


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

    /* The directories can be accessed here. */

    /* Delete the two sub directories again. */
    ff_rmdir( "subfolder/sub1" );
    ff_rmdir( "subfolder" );
}
						
Example use of the ff_rmdir() API function to delete a directory



[ 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.