grblHAL core  20241107
vfs.c File Reference
#include <string.h>
#include <stdlib.h>
#include "hal.h"
#include "vfs.h"

Functions

char * vfs_fixpath (char *path)
 
vfs_file_tvfs_open (const char *filename, const char *mode)
 
void vfs_close (vfs_file_t *file)
 
size_t vfs_read (void *buffer, size_t size, size_t count, vfs_file_t *file)
 
size_t vfs_write (const void *buffer, size_t size, size_t count, vfs_file_t *file)
 
int vfs_puts (const char *s, vfs_file_t *file)
 
size_t vfs_tell (vfs_file_t *file)
 
int vfs_seek (vfs_file_t *file, size_t offset)
 
bool vfs_eof (vfs_file_t *file)
 
int vfs_rename (const char *from, const char *to)
 
int vfs_unlink (const char *filename)
 
int vfs_mkdir (const char *path)
 
int vfs_rmdir (const char *path)
 
int vfs_chdir (const char *path)
 
vfs_dir_tvfs_opendir (const char *path)
 
vfs_dirent_tvfs_readdir (vfs_dir_t *dir)
 
void vfs_closedir (vfs_dir_t *dir)
 
char * vfs_getcwd (char *buf, size_t len)
 
int vfs_stat (const char *filename, vfs_stat_t *st)
 
int vfs_utime (const char *filename, struct tm *modified)
 
vfs_free_tvfs_fgetfree (const char *path)
 
bool vfs_mount (const char *path, const vfs_t *fs, vfs_st_mode_t mode)
 
bool vfs_unmount (const char *path)
 
vfs_drive_tvfs_get_drive (const char *path)
 
vfs_drives_tvfs_drives_open (void)
 
vfs_drive_tvfs_drives_read (vfs_drives_t *handle, bool add_hidden)
 
void vfs_drives_close (vfs_drives_t *handle)
 
vfs_free_tvfs_drive_getfree (vfs_drive_t *drive)
 
int vfs_drive_format (vfs_drive_t *drive)
 

Variables

int vfs_errno = 0
 
vfs_events_t vfs = {0}
 

Function Documentation

◆ vfs_chdir()

int vfs_chdir ( const char *  path)

◆ vfs_close()

void vfs_close ( vfs_file_t file)

◆ vfs_closedir()

void vfs_closedir ( vfs_dir_t dir)

◆ vfs_drive_format()

int vfs_drive_format ( vfs_drive_t drive)

◆ vfs_drive_getfree()

vfs_free_t* vfs_drive_getfree ( vfs_drive_t drive)

◆ vfs_drives_close()

void vfs_drives_close ( vfs_drives_t handle)

◆ vfs_drives_open()

vfs_drives_t* vfs_drives_open ( void  )

◆ vfs_drives_read()

vfs_drive_t* vfs_drives_read ( vfs_drives_t handle,
bool  add_hidden 
)

◆ vfs_eof()

bool vfs_eof ( vfs_file_t file)

◆ vfs_fgetfree()

vfs_free_t* vfs_fgetfree ( const char *  path)

◆ vfs_fixpath()

char* vfs_fixpath ( char *  path)

◆ vfs_get_drive()

vfs_drive_t* vfs_get_drive ( const char *  path)

◆ vfs_getcwd()

char* vfs_getcwd ( char *  buf,
size_t  len 
)

◆ vfs_mkdir()

int vfs_mkdir ( const char *  path)

◆ vfs_mount()

bool vfs_mount ( const char *  path,
const vfs_t fs,
vfs_st_mode_t  mode 
)

◆ vfs_open()

vfs_file_t* vfs_open ( const char *  filename,
const char *  mode 
)

◆ vfs_opendir()

vfs_dir_t* vfs_opendir ( const char *  path)

◆ vfs_puts()

int vfs_puts ( const char *  s,
vfs_file_t file 
)

◆ vfs_read()

size_t vfs_read ( void *  buffer,
size_t  size,
size_t  count,
vfs_file_t file 
)

◆ vfs_readdir()

vfs_dirent_t* vfs_readdir ( vfs_dir_t dir)

◆ vfs_rename()

int vfs_rename ( const char *  from,
const char *  to 
)

◆ vfs_rmdir()

int vfs_rmdir ( const char *  path)

◆ vfs_seek()

int vfs_seek ( vfs_file_t file,
size_t  offset 
)

◆ vfs_stat()

int vfs_stat ( const char *  filename,
vfs_stat_t st 
)

◆ vfs_tell()

size_t vfs_tell ( vfs_file_t file)

◆ vfs_unlink()

int vfs_unlink ( const char *  filename)

◆ vfs_unmount()

bool vfs_unmount ( const char *  path)

◆ vfs_utime()

int vfs_utime ( const char *  filename,
struct tm modified 
)

◆ vfs_write()

size_t vfs_write ( const void *  buffer,
size_t  size,
size_t  count,
vfs_file_t file 
)

Variable Documentation

◆ vfs

vfs_events_t vfs = {0}

◆ vfs_errno

int vfs_errno = 0