Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


...

Code Block
languagecpp
int  fs_remove (const  char  *name_full);

...

summary
HTML Table
classPlain_Table
Table Row (tr)
Table Cell (td)
Anchor
11100841110084


File

...

...

Called from

...

Code enabled by

...

...

fs_api.

...

c

...

Application

...

FS_CFG_API_EN and not FS_CFG_RD_ONLY_EN

Anchor10922401092240Delete a file or directory. Anchor11048031104803

Arguments

...

10922421092242name_full Anchor11408611140861

Name of the entry.

...

...

Returned Value

...

0, if the file is not removed.anchor

10922461092246-1, if the file is not removed. Anchor11002011100201

Notes/Warnings

...

...

  1. When a file is removed, the space occupied by the file is freed and shall no longer be accessible.

...

  1. A directory can be removed only if it is an empty directory.

...

  1. The root directory cannot be removed.

...

Example

...

Code Block

...

void { int err; . . . err = fs_remove(“sd

{
    int  err;
    .
    .
    .
    err = fs_remove("sd:0:\\data\\file001.
txt”
txt");   /* Remove file.  */
if

    if (err != 0)
{
 {
        APP_TRACE_INFO((
“Could
"Could not remove file.
"));
} . . . err = fs_remove(“sd

    }
    .
    .
    .
    err = fs_remove("sd:0:\\data\\
old”
old");           /* Remove dir.   */
if

    if (err != 0)
{
 {
        APP_TRACE_INFO((
“Could
"Could not remove dir.
"));
} . . . }tr

    }
    .
    .
    .
}
HTML Table
summary
classCode_Listing
Table Row (tr)
Table Cell (td)
rowspan21
Anchor
11231081123108
languagecpp
void  App_Fnct (void)
Anchor
11231101123110
Anchor
11231121123112
Anchor
11231141123114
Anchor
11231161123116
Anchor
11231181123118
Anchor
11231201123120
Anchor
11231221123122
Anchor
11231241123124
Anchor
11231261123126
Anchor
11231281123128
Anchor
11231301123130
Anchor
11231321123132
Anchor
11231341123134
Anchor
11231361123136
Anchor
11231381123138
Anchor
11231401123140
Anchor
11231421123142
Anchor
11231441123144
Anchor
11231461123146
Anchor
11231481123148
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)