LexLeo 0.0.0-dev+f8e5087-dirty
Technical documentation
Loading...
Searching...
No Matches
osal_file_ops.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-3.0-or-later
2 * Copyright (C) 2026 Sylvain Labopin
3 */
4
20#ifndef LEXLEO_OSAL_FILE_OPS_H
21#define LEXLEO_OSAL_FILE_OPS_H
22
34#include "osal/file/osal_file_types.h"
35
37
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
54typedef struct osal_file_ops {
55
82 OSAL_FILE **out,
83 const char *pathname,
84 const char *mode,
85 const osal_mem_ops_t *mem_ops);
86
112 size_t (*read)(
113 void *ptr,
114 size_t size,
115 size_t nmemb,
116 OSAL_FILE *stream,
118
140 size_t (*write)(
141 const void *ptr,
142 size_t size,
143 size_t nmemb,
144 OSAL_FILE *stream,
146
157
168
170
185
186#ifdef __cplusplus
187}
188#endif
189
190#endif // LEXLEO_OSAL_FILE_OPS_H
const osal_file_ops_t * osal_file_default_ops(void)
Return the default OSAL file operations for the active platform.
struct osal_file_ops osal_file_ops_t
Operations table for the low-level OSAL file abstraction.
osal_file_status_t
Private representation of an acquired OSAL file handle.
Operations table for the low-level OSAL file abstraction.
size_t(* write)(const void *ptr, size_t size, size_t nmemb, OSAL_FILE *stream, osal_file_status_t *st)
Write elements to an open OSAL_FILE.
size_t(* read)(void *ptr, size_t size, size_t nmemb, OSAL_FILE *stream, osal_file_status_t *st)
Read elements from an open OSAL_FILE.
osal_file_status_t(* close)(OSAL_FILE *stream)
Close an open OSAL_FILE and release its associated resource.
osal_file_status_t(* open)(OSAL_FILE **out, const char *pathname, const char *mode, const osal_mem_ops_t *mem_ops)
Open a file resource.
osal_file_status_t(* flush)(OSAL_FILE *stream)
Flush buffered output associated with an open OSAL_FILE.