Versions Compared

Key

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

...

Pointer to variable that will the receive return error code from this function:

FS_ERR_NONE

File opened.

FS_ERR_NAME_NULL

Argument name_full passed a NULL pointer.

Or entry error (see Section B.04).

Returned Value

None.

Notes/Warnings

...

FS_FILE_ACCESS_MODE_RD

File opened for reads.

FS_FILE_ACCESS_MODE_WR

File opened for writes.

FS_FILE_ACCESS_MODE_CREATE

File will be created, if necessary.

FS_FILE_ACCESS_MODE_TRUNC

File length will be truncated to 0.

FS_FILE_ACCESS_MODE_APPEND

All writes will be performed at EOF.

FS_FILE_ACCESS_MODE_EXCL

File will be opened if and only if it does not already exist.

FS_FILE_ACCESS_MODE_CACHED

File data will be cached.

...

fopen() Mode String

mode Equivalent

“r” or “rb”

FS_FILE_ACCESS_MODE_RD

“w” or “wb”

FS_FILE_ACCESS_MODE_WR |
FS_FILE_ACCESS_MODE_CREATE |
FS_FILE_ACCESS_MODE_TRUNC

“a” or “ab”

FS_FILE_ACCESS_MODE_WR |
FS_FILE_ACCESS_MODE_CREATE |
FS_FILE_ACCESS_MODE_APPEND

“r+” or “rb+” or “r+b”

FS_FILE_ACCESS_MODE_RD |
FS_FILE_ACCESS_MODE_WR

“w+” or “wb+” or “w+b”

FS_FILE_ACCESS_MODE_RD |
FS_FILE_ACCESS_MODE_WR |
FS_FILE_ACCESS_MODE_CREATE |
FS_FILE_ACCESS_MODE_TRUNC

“a+” or “ab+” or “a+b”

FS_FILE_ACCESS_MODE_RD |

FS_FILE_ACCESS_MODE_WR |
FS_FILE_ACCESS_MODE_CREATE |

FS_FILE_ACCESS_MODE_APPEND

...