LexLeo 0.0.0-dev+f8e5087-dirty
Technical documentation
Loading...
Searching...
No Matches
osal_file.c File Reference
#include "internal/osal_file_internal.h"
#include "osal/file/osal_file.h"
#include "osal/file/osal_file_env.h"
#include "osal/file/osal_file_ops.h"
#include "osal/mem/osal_mem_ops.h"
#include "policy/lexleo_cstd_types.h"
Include dependency graph for osal_file.c:

Go to the source code of this file.

Functions

const osal_file_ops_tosal_file_default_ops (void)
 Return the default OSAL file operations for the active platform.
 
static void set_status (osal_file_status_t *st, osal_file_status_t v)
 
osal_file_tosal_file_open (const char *path_utf8, uint32_t flags, osal_file_status_t *status, const osal_file_env_t *env)
 
size_t osal_file_read (osal_file_t *f, void *buf, size_t n, osal_file_status_t *status)
 
size_t osal_file_write (osal_file_t *f, const void *buf, size_t n, osal_file_status_t *status)
 
osal_file_status_t osal_file_flush (osal_file_t *f)
 
osal_file_status_t osal_file_close (osal_file_t *f)
 
osal_file_env_t osal_file_default_env (const osal_mem_ops_t *mem)
 

Function Documentation

◆ osal_file_close()

osal_file_status_t osal_file_close ( osal_file_t f)

Definition at line 74 of file osal_file.c.

◆ osal_file_default_env()

osal_file_env_t osal_file_default_env ( const osal_mem_ops_t mem)

Definition at line 81 of file osal_file.c.

◆ osal_file_default_ops()

const osal_file_ops_t * osal_file_default_ops ( void  )

Return the default POSIX / C stdio OSAL file operations table.

This function exposes the platform-specific low-level file operations used by the osal_file module.

Returns
A pointer to the default operations table for the active platform.
Note
The returned operations table is not owned by the caller.

Return the default OSAL file operations for the active platform.

Returns
A pointer to the default osal_file_ops_t table for this backend.

Definition at line 13 of file osal_file.c.

◆ osal_file_flush()

osal_file_status_t osal_file_flush ( osal_file_t f)

Definition at line 67 of file osal_file.c.

◆ osal_file_open()

osal_file_t * osal_file_open ( const char *  path_utf8,
uint32_t  flags,
osal_file_status_t status,
const osal_file_env_t env 
)

Definition at line 25 of file osal_file.c.

◆ osal_file_read()

size_t osal_file_read ( osal_file_t f,
void *  buf,
size_t  n,
osal_file_status_t status 
)

Definition at line 39 of file osal_file.c.

◆ osal_file_write()

size_t osal_file_write ( osal_file_t f,
const void *  buf,
size_t  n,
osal_file_status_t status 
)

Definition at line 53 of file osal_file.c.

◆ set_status()

static void set_status ( osal_file_status_t st,
osal_file_status_t  v 
)
static

Definition at line 21 of file osal_file.c.