Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
fs_file_system_t Struct Reference

File System interface structure. More...

#include <fs_sys.h>

Data Fields

int(* open )(struct fs_file_t *filp, const char *fs_path, fs_mode_t flags)
 
ssize_t(* read )(struct fs_file_t *filp, void *dest, size_t nbytes)
 
ssize_t(* write )(struct fs_file_t *filp, const void *src, size_t nbytes)
 
int(* lseek )(struct fs_file_t *filp, off_t off, int whence)
 
off_t(* tell )(struct fs_file_t *filp)
 
int(* truncate )(struct fs_file_t *filp, off_t length)
 
int(* sync )(struct fs_file_t *filp)
 
int(* close )(struct fs_file_t *filp)
 
int(* opendir )(struct fs_dir_t *dirp, const char *fs_path)
 
int(* readdir )(struct fs_dir_t *dirp, struct fs_dirent *entry)
 
int(* closedir )(struct fs_dir_t *dirp)
 
int(* mount )(struct fs_mount_t *mountp)
 
int(* unmount )(struct fs_mount_t *mountp)
 
int(* unlink )(struct fs_mount_t *mountp, const char *name)
 
int(* rename )(struct fs_mount_t *mountp, const char *from, const char *to)
 
int(* mkdir )(struct fs_mount_t *mountp, const char *name)
 
int(* stat )(struct fs_mount_t *mountp, const char *path, struct fs_dirent *entry)
 
int(* statvfs )(struct fs_mount_t *mountp, const char *path, struct fs_statvfs *stat)
 

Detailed Description

File System interface structure.

Parameters
openOpens or creates a file, depending on flags given
readReads nbytes number of bytes
writeWrites nbytes number of bytes
lseekMoves the file position to a new location in the file
tellRetrieves the current position in the file
truncateTruncates/expands the file to the new length
syncFlushes the cache of an open file
closeFlushes the associated stream and closes the file
opendirOpens an existing directory specified by the path
readdirReads directory entries of an open directory
closedirCloses an open directory
mountMounts a file system
unmountUnmounts a file system
unlinkDeletes the specified file or directory
renameRenames a file or directory
mkdirCreates a new directory using specified path
statChecks the status of a file or directory specified by the path
statvfsReturns the total and available space on the file system volume

Field Documentation

◆ close

int(* fs_file_system_t::close) (struct fs_file_t *filp)

◆ closedir

int(* fs_file_system_t::closedir) (struct fs_dir_t *dirp)

◆ lseek

int(* fs_file_system_t::lseek) (struct fs_file_t *filp, off_t off, int whence)

◆ mkdir

int(* fs_file_system_t::mkdir) (struct fs_mount_t *mountp, const char *name)

◆ mount

int(* fs_file_system_t::mount) (struct fs_mount_t *mountp)

◆ open

int(* fs_file_system_t::open) (struct fs_file_t *filp, const char *fs_path, fs_mode_t flags)

◆ opendir

int(* fs_file_system_t::opendir) (struct fs_dir_t *dirp, const char *fs_path)

◆ read

ssize_t(* fs_file_system_t::read) (struct fs_file_t *filp, void *dest, size_t nbytes)

◆ readdir

int(* fs_file_system_t::readdir) (struct fs_dir_t *dirp, struct fs_dirent *entry)

◆ rename

int(* fs_file_system_t::rename) (struct fs_mount_t *mountp, const char *from, const char *to)

◆ stat

int(* fs_file_system_t::stat) (struct fs_mount_t *mountp, const char *path, struct fs_dirent *entry)

◆ statvfs

int(* fs_file_system_t::statvfs) (struct fs_mount_t *mountp, const char *path, struct fs_statvfs *stat)

◆ sync

int(* fs_file_system_t::sync) (struct fs_file_t *filp)

◆ tell

off_t(* fs_file_system_t::tell) (struct fs_file_t *filp)

◆ truncate

int(* fs_file_system_t::truncate) (struct fs_file_t *filp, off_t length)

◆ unlink

int(* fs_file_system_t::unlink) (struct fs_mount_t *mountp, const char *name)

◆ unmount

int(* fs_file_system_t::unmount) (struct fs_mount_t *mountp)

◆ write

ssize_t(* fs_file_system_t::write) (struct fs_file_t *filp, const void *src, size_t nbytes)

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