Versions Compared

Key

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


...

Code Block
languagecpp
int  fs_fgetpos (FS_FILE    *p_file,

...


                 fs_fpos_t  *p_pos);

...

...


...

File

...

Called from

...

Code enabled by

...

...

fs_api.

...

c

...

Application

...

FS_CFG_API_EN

...

10919081091908Get file position indicator. Anchor11045991104599

Arguments

...

p_fileanchor11405461140546

Pointer to a file.

Anchor10919111091911p_posanchor11405531140553

Pointer to variable that will receive the file position indicator.

...

Returned Value

...

0, if no error occurs. Anchor10919141091914

Non-zero value, otherwise. Anchor10999971099997

Notes/Warnings

...

...

  1. The return value should be tested against 0:

...

  1. Code Block

...

  1. language

...

rowspan6

...

  1. cpp
    rtn = fs_fgetpos(p_file, &pos);

...

  1. 
    if (rtn == 0)

...

  1.  {
        // No error

...

  1.  occurred
    } else {
        // Handle error
    }


  2. The value placed in pos should be passed to FS_fsetpos() to reposition the file to its position at the time when this function was called.