Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

fs_size_t  fs_fwrite (void       *p_src,
                      fs_size_t   size,
                      fs_size_t   nitems,
                      FS_FILE    *p_file);

File

Called from

Code enabled by

fs_api..c

Application

FS_CFG_API_EN and not FS_CFG_RD_ONLY_EN

Write to a file.

Arguments

p_src

Pointer to source buffer.

size

Size of each item to write.

nitems

Number of items to write.

p_file

Pointer to a file.

Returned Value

Number of items written.

Notes/Warnings

  • The size or nitems is 0, then the file is unchanged and zero is returned.
  • If the file is buffered and the last operation is input (read), then a call to fs_fsetpos() or fs_fseek() must occur before output (write can be performed unless the end-of-file was encountered.
  • The file must have been opened in write or update (read/write) mode.
  • If the file was opened in append mode, all writes are forced to the end-of-file.
    • No labels