f_delete


Use this function to delete a file.

Note: A read-only or open file cannot be deleted.

Format

int f_delete ( const char * filename )

Arguments

Argument Description Type
filename A null-terminated string with the name of the file to delete, with or without its path. char *

Return values

Return value Description
F_NOERR Successful execution.
Else See Error Codes.

Example

void myfunc( void )
{
        .
        .
    f_delete( "oldfile.txt" );
    f_delete( "A:/subdir/oldfile.txt" );
        .
        .
}