Versions Compared

Key

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

...

Panel
borderWidth0
title Table - fs_fopen() mode strings interpretations


fs_fopen() Mode String

Read?

Write?

Truncate?

Create?

Append?

“r” or “rb”

Yes

No

No

No

No

“w” or “wb”

No

Yes

Yes

Yes

No

“a” or “ab”

No

Yes

No

Yes

Yes

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

Yes

Yes

No

No

No

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

Yes

Yes

Yes

Yes

No

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

Yes

Yes

No

Yes

Yes



After a file is opened, any of the file access functions valid for that its mode can be called. The most commonly used functions are fs_fread() and fs_fwrite(), which read or write a certain number of ‘items’ from a file:

...