HomeCore 0.1.3 (07b5544)
Bare-metal personal computer firmware for Cortex-M
Loading...
Searching...
No Matches
vfs_fs_ops_t Struct Reference

Operations a mounted filesystem provides; every one is required. More...

#include <homecore/vfs/vfs.h>

Data Fields

int(* open )(void *fs, const char *path, int flags, void **file)
 Open path with open() flags; store the file handle in file.
 
int(* close )(void *fs, void *file)
 Close and free a file handle.
 
int(* read )(void *fs, void *file, void *buf, unsigned len)
 Read up to len bytes; 0 at end of file.
 
int(* write )(void *fs, void *file, const void *buf, unsigned len)
 Write len bytes; a short count means the filesystem is full.
 
int(* lseek )(void *fs, void *file, int offset, int whence)
 Move the file position; return the new position.
 
int(* fstat )(void *fs, void *file, vfs_stat_t *stat)
 Report an open file's type and size.
 
int(* stat )(void *fs, const char *path, vfs_stat_t *stat)
 Report a path's type and size; ENOENT if it does not exist.
 
int(* mkdir )(void *fs, const char *path)
 Create a directory whose parent exists.
 
int(* rmdir )(void *fs, const char *path)
 Remove an empty directory.
 
int(* unlink )(void *fs, const char *path)
 Remove a closed regular file.
 
int(* list )(void *fs, const char *path, vfs_directory_visitor_t visitor, void *context)
 Call visitor for each entry of a directory, as vfs_list() does.
 

Detailed Description

Operations a mounted filesystem provides; every one is required.


The documentation for this struct was generated from the following file: