13#ifndef ZEPHYR_INCLUDE_FS_FS_SYS_H_
14#define ZEPHYR_INCLUDE_FS_FS_SYS_H_
61 const void *src,
size_t nbytes);
195#if defined(CONFIG_FILE_SYSTEM_GC) || defined(__DOXYGEN__)
204#if defined(CONFIG_FILE_SYSTEM_MKFS) || defined(__DOXYGEN__)
irp nz macro MOVR cc s mov cc s endm endr irp aw macro LDR aa off
Definition asm-macro-32-bit-gnu.h:20
uint8_t fs_mode_t
Type for fs_open() flags.
Definition fs_interface.h:81
__SIZE_TYPE__ ssize_t
Definition types.h:28
__INTPTR_TYPE__ off_t
Definition types.h:36
flags
Definition parser.h:97
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:105
Directory object representing an open directory.
Definition fs_interface.h:109
Structure to receive file or directory information.
Definition fs.h:132
File System interface structure.
Definition fs_sys.h:28
int(* unmount)(struct fs_mount_t *mountp)
Unmounts a file system.
Definition fs_sys.h:148
int(* lseek)(struct fs_file_t *filp, off_t off, int whence)
Moves the file position to a new location in the file.
Definition fs_sys.h:70
int(* mount)(struct fs_mount_t *mountp)
Mounts a file system.
Definition fs_sys.h:141
ssize_t(* write)(struct fs_file_t *filp, const void *src, size_t nbytes)
Writes nbytes number of bytes.
Definition fs_sys.h:60
int(* mkfs)(uintptr_t dev_id, void *cfg, int flags)
Formats a device to specified file system type.
Definition fs_sys.h:216
int(* unlink)(struct fs_mount_t *mountp, const char *name)
Deletes the specified file or directory.
Definition fs_sys.h:156
int(* statvfs)(struct fs_mount_t *mountp, const char *path, struct fs_statvfs *stat)
Returns the total and available space on the file system volume.
Definition fs_sys.h:193
off_t(* tell)(struct fs_file_t *filp)
Retrieves the current position in the file.
Definition fs_sys.h:77
int(* gc)(struct fs_mount_t *mountp)
Attempt to proactively clean file system.
Definition fs_sys.h:202
int(* opendir)(struct fs_dir_t *dirp, const char *fs_path)
Opens an existing directory specified by the path.
Definition fs_sys.h:113
int(* open)(struct fs_file_t *filp, const char *fs_path, fs_mode_t flags)
Opens or creates a file, depending on flags given.
Definition fs_sys.h:41
int(* stat)(struct fs_mount_t *mountp, const char *path, struct fs_dirent *entry)
Checks the status of a file or directory specified by the path.
Definition fs_sys.h:183
int(* truncate)(struct fs_file_t *filp, off_t length)
Truncates/expands the file to the new length.
Definition fs_sys.h:85
ssize_t(* read)(struct fs_file_t *filp, void *dest, size_t nbytes)
Reads nbytes number of bytes.
Definition fs_sys.h:51
int(* mkdir)(struct fs_mount_t *mountp, const char *name)
Creates a new directory using specified path.
Definition fs_sys.h:174
int(* readdir)(struct fs_dir_t *dirp, struct fs_dirent *entry)
Reads directory entries of an open directory.
Definition fs_sys.h:121
int(* closedir)(struct fs_dir_t *dirp)
Closes an open directory.
Definition fs_sys.h:128
int(* sync)(struct fs_file_t *filp)
Flushes the cache of an open file.
Definition fs_sys.h:92
int(* close)(struct fs_file_t *filp)
Flushes the associated stream and closes the file.
Definition fs_sys.h:99
int(* rename)(struct fs_mount_t *mountp, const char *from, const char *to)
Renames a file or directory.
Definition fs_sys.h:165
File object representing an open file.
Definition fs_interface.h:95
File system mount info structure.
Definition fs.h:106
Structure to receive volume statistics.
Definition fs.h:149