...
FS
...
_
...
FILE *FSFile_Open (CPU_CHAR *name_full,
...
FS_FLAGS
...
mode
FS_ERR *p_err);
...
...
File |
...
Called from |
...
...
Code enabled by |
...
rowspan | 2 |
---|
...
|
...
...
Application; |
...
|
...
rowspan | 2 |
---|
...
N/A |
...
Anchor
See fs_fopen()
for more information. Anchor
Arguments
...
name_full
1143094 Anchor
Name of the file. See section 4-3 “μC/FS File and Directory Names and Paths”
...
for information about file names.
...
mode
File access mode (see Notes #1 and #2).
...
p_err
Pointer to variable that will the receive return error code from this function:
...
class | WebWorks_Indent_1 |
---|
...
FS_ERR_NONE
...
...
File opened.
...
...
FS_ERR_NAME_NULL
...
class | WebWorks_Indent_2 |
---|
...
Argument name_full
passed a NULL pointer.
...
Or entry error (see Section B.04).
...
Returned Value
...
Notes/Warnings
...
...
class | WebWorks_Indent_1 |
---|
...
FS_FILE_ACCESS_MODE_RD
...
...
File opened for reads.
...
class | WebWorks_Indent_1 |
---|
...
FS_FILE_ACCESS_MODE_WR
...
...
class | WebWorks_Indent_2 |
---|
...
File opened for writes.
...
...
FS_FILE_ACCESS_MODE_CREATE
...
...
class | WebWorks_Indent_2 |
---|
...
File will be created, if necessary.
...
class | WebWorks_Indent_1 |
---|
...
FS_FILE_ACCESS_MODE_TRUNC
...
...
File length will be truncated to 0.
...
...
FS_FILE_ACCESS_MODE_APPEND
...
class | WebWorks_Indent_2 |
---|
...
All writes will be performed at EOF.
...
class | WebWorks_Indent_1 |
---|
...
...
FS_FILE_ACCESS_MODE_EXCL
...
class | WebWorks_Indent_2 |
---|
...
File will be opened if and only if it does not already exist.
...
class | WebWorks_Indent_1 |
---|
...
FS_FILE_ACCESS_MODE_CACHED
...
...
File data will be cached.
...
fopen() Mode String |
...
...
mode Equivalent |
...
...
“r” or “rb” |
...
|
...
“w” or “wb” |
...
|
...
“a” or “ab” |
...
|
...
...
“r+” or “rb+” or “r+b” |
...
|
...
“w+” or “wb+” or “w+b” |
...
...
|
...
...
“a+” or “ab+” or “a+b” |
...
...
|
...
|
...
|
...
Table A-1 fs_fopen() mode strings and mode equivalents.