|
Muteki
EABI code execution on Besta® RTOS devices.
|
Low-level and built-in high-level file operation API. More...
#include "../common.h"Go to the source code of this file.
Typedefs | |
| typedef struct bxc_fs_file_s | bxc_fs_file_t |
| File descriptor type. | |
Enumerations | |
| enum | bxc_seek_whence_e { BXC_SEEK_SET = 0 , BXC_SEEK_CUR , BXC_SEEK_END } |
| whence values for __fseek(). More... | |
Functions | |
| bxc_fs_file_t * | _afopen (const char *pathname, const char *mode) |
Open a file located at pathname. | |
| bxc_fs_file_t * | __wfopen (const UTF16 *pathname, const UTF16 *mode) |
Open a file located at UTF-16-encoded pathname. | |
| size_t | _fread (void *ptr, size_t size, size_t nmemb, bxc_fs_file_t *stream) |
Read nmemb data units of size size from a file. | |
| size_t | _fwrite (const void *ptr, size_t size, size_t nmemb, bxc_fs_file_t *stream) |
Write nmemb data units of size size to a file. | |
| int | __fseek (bxc_fs_file_t *stream, long offset, int whence) |
| Seek to a specific position in an opened file. | |
| long | _ftell (bxc_fs_file_t *stream) |
| Return the current position of the file. | |
| int | __fflush (bxc_fs_file_t *stream) |
| Flush the cached writes to the file. | |
| int | _fclose (bxc_fs_file_t *stream) |
| Close a file. | |
Low-level and built-in high-level file operation API.
| enum bxc_seek_whence_e |
whence values for __fseek().
| Enumerator | |
|---|---|
| BXC_SEEK_SET | Seek from the beginning of file. |
| BXC_SEEK_CUR | Seek from current offset. |
| BXC_SEEK_END | Seek from the end of file. |
|
extern |
Flush the cached writes to the file.
Analogous to the fflush() function in POSIX.
| stream | Pointer reference returned by _afopen() or _wfopen(). |
| 0 | The operation was completed successfully. |
| -1 | The operation failed with error. |
|
extern |
Seek to a specific position in an opened file.
Analogous to the fseek() function in POSIX.
| stream | Pointer reference returned by _afopen() or _wfopen(). |
| offset | Seek offset. |
| whence | Treat offset as relative to start of file/current offset/end of file. |
| 0 | The operation was completed successfully. |
| -1 | The operation failed with error. |
|
extern |
Open a file located at UTF-16-encoded pathname.
Analogous to the _wfopen() function in Windows.
| pathname | Path to the file to be opened. LFN (long filename) is supported. |
| mode | Mode. Tested modes are _BUL("rb") and _BUL("wb+"). |
|
extern |
Open a file located at pathname.
Analogous to the fopen() function in POSIX and Windows.
| pathname | DOS 8.3 path to the file to be opened. |
| mode | Mode. Tested modes are "rb" and "wb+". |
|
extern |
Close a file.
Analogous to the fclose() function in POSIX.
| stream | Pointer reference returned by _afopen() or _wfopen(). |
|
extern |
Read nmemb data units of size size from a file.
Analogous to the POSIX fread() function.
| ptr | Pointer reference to a buffer that will hold the data read from the file. |
| size | Size of individual data unit. |
| nmemb | Number of data units to read. |
| stream | Pointer reference returned by _afopen() or _wfopen(). |
|
extern |
Return the current position of the file.
Analogous to the ftell() function in POSIX.
| stream | Pointer reference returned by _afopen() or _wfopen(). |
|
extern |
Write nmemb data units of size size to a file.
Analogous to the fwrite() function in POSIX.
| ptr | Pointer reference to data that will be written to the file. |
| size | Size of individual data unit. |
| nmemb | Number of data units to write. |
| stream | Pointer reference returned by _afopen() or _wfopen(). |