1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-05-09 16:41:02 +03:00

Merge pull request #1888 from hemalchevli/patch-2

added descriptions for fopen modes
This commit is contained in:
Ivan Grokhotkov 2016-04-13 14:15:49 +03:00
commit 1f38703ce7

View File

@ -105,6 +105,28 @@ Opens a file. `path` should be an absolute path starting with a slash
(e.g. `/dir/filename.txt`). `mode` is a string specifying access mode. It can be
one of "r", "w", "a", "r+", "w+", "a+". Meaning of these modes is the same as
for `fopen` C function.
r Open text file for reading. The stream is positioned at the
beginning of the file.
r+ Open for reading and writing. The stream is positioned at the
beginning of the file.
w Truncate file to zero length or create text file for writing.
The stream is positioned at the beginning of the file.
w+ Open for reading and writing. The file is created if it does
not exist, otherwise it is truncated. The stream is
positioned at the beginning of the file.
a Open for appending (writing at end of file). The file is
created if it does not exist. The stream is positioned at the
end of the file.
a+ Open for reading and appending (writing at end of file). The
file is created if it does not exist. The initial file
position for reading is at the beginning of the file, but
output is always appended to the end of the file.
Returns *File* object. To check whether the file was opened successfully, use
the boolean operator.