Muteki
EABI code execution on Besta® RTOS devices.
Toggle main menu visibility
Loading...
Searching...
No Matches
file.h
Go to the documentation of this file.
1
/*
2
* Copyright 2021-present dogtopus
3
* SPDX-License-Identifier: MIT
4
*/
5
10
11
#ifndef __MUTEKI_FS_FILE_H__
12
#define __MUTEKI_FS_FILE_H__
13
14
#include "
../common.h
"
15
16
#ifdef __cplusplus
17
extern
"C"
{
18
#endif
19
23
enum
bxc_seek_whence_e
{
25
BXC_SEEK_SET
= 0,
27
BXC_SEEK_CUR
,
29
BXC_SEEK_END
,
30
};
31
33
typedef
struct
bxc_fs_file_s
bxc_fs_file_t
;
38
struct
bxc_fs_file_s;
39
47
extern
bxc_fs_file_t
*
_afopen
(
const
char
*pathname,
const
char
*mode);
48
56
extern
bxc_fs_file_t
*
__wfopen
(
const
UTF16
*pathname,
const
UTF16
*mode);
57
67
extern
size_t
_fread
(
void
*ptr,
size_t
size,
size_t
nmemb,
bxc_fs_file_t
*stream);
68
78
extern
size_t
_fwrite
(
const
void
*ptr,
size_t
size,
size_t
nmemb,
bxc_fs_file_t
*stream);
79
90
extern
int
__fseek
(
bxc_fs_file_t
*stream,
long
offset,
int
whence);
91
98
extern
long
_ftell
(
bxc_fs_file_t
*stream);
99
107
extern
int
__fflush
(
bxc_fs_file_t
*stream);
108
115
extern
int
_fclose
(
bxc_fs_file_t
*stream);
116
117
#ifdef __cplusplus
118
}
// extern "C"
119
#endif
120
121
#endif
// __MUTEKI_FS_FILE_H__
common.h
Common include file for all muteki-shims headers.
UTF16
#define UTF16
"Portable" Besta UTF-16 type used by other headers.
Definition
common.h:54
_fclose
int _fclose(bxc_fs_file_t *stream)
Close a file.
__fflush
int __fflush(bxc_fs_file_t *stream)
Flush the cached writes to the file.
bxc_seek_whence_e
bxc_seek_whence_e
whence values for __fseek().
Definition
file.h:23
BXC_SEEK_SET
@ BXC_SEEK_SET
Definition
file.h:25
BXC_SEEK_CUR
@ BXC_SEEK_CUR
Definition
file.h:27
BXC_SEEK_END
@ BXC_SEEK_END
Definition
file.h:29
_afopen
bxc_fs_file_t * _afopen(const char *pathname, const char *mode)
Open a file located at pathname.
__wfopen
bxc_fs_file_t * __wfopen(const UTF16 *pathname, const UTF16 *mode)
Open a file located at UTF-16-encoded pathname.
bxc_fs_file_t
struct bxc_fs_file_s bxc_fs_file_t
File descriptor type.
Definition
file.h:33
_ftell
long _ftell(bxc_fs_file_t *stream)
Return the current position of the file.
_fread
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.
_fwrite
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.
__fseek
int __fseek(bxc_fs_file_t *stream, long offset, int whence)
Seek to a specific position in an opened file.
include
muteki
fs
file.h
Generated by
1.18.0