Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
fs_sys.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_FS_FS_SYS_H_
8#define ZEPHYR_INCLUDE_FS_FS_SYS_H_
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
43 /* File operations */
44 int (*open)(struct fs_file_t *filp, const char *fs_path,
46 ssize_t (*read)(struct fs_file_t *filp, void *dest, size_t nbytes);
47 ssize_t (*write)(struct fs_file_t *filp,
48 const void *src, size_t nbytes);
49 int (*lseek)(struct fs_file_t *filp, off_t off, int whence);
50 off_t (*tell)(struct fs_file_t *filp);
51 int (*truncate)(struct fs_file_t *filp, off_t length);
52 int (*sync)(struct fs_file_t *filp);
53 int (*close)(struct fs_file_t *filp);
54 /* Directory operations */
55 int (*opendir)(struct fs_dir_t *dirp, const char *fs_path);
56 int (*readdir)(struct fs_dir_t *dirp, struct fs_dirent *entry);
57 int (*closedir)(struct fs_dir_t *dirp);
58 /* File system level operations */
59 int (*mount)(struct fs_mount_t *mountp);
60 int (*unmount)(struct fs_mount_t *mountp);
61 int (*unlink)(struct fs_mount_t *mountp, const char *name);
62 int (*rename)(struct fs_mount_t *mountp, const char *from,
63 const char *to);
64 int (*mkdir)(struct fs_mount_t *mountp, const char *name);
65 int (*stat)(struct fs_mount_t *mountp, const char *path,
66 struct fs_dirent *entry);
67 int (*statvfs)(struct fs_mount_t *mountp, const char *path,
68 struct fs_statvfs *stat);
69};
70
75#ifdef __cplusplus
76}
77#endif
78
79#endif /* ZEPHYR_INCLUDE_FS_FS_SYS_H_ */
irp nz macro MOVR cc s mov cc s endm endr irp aw macro LDR aa off
Definition: asm-macro-32-bit-gnu.h:17
uint8_t fs_mode_t
Definition: fs_interface.h:36
flags
Definition: http_parser.h:131
__SIZE_TYPE__ ssize_t
Definition: types.h:28
Directory object representing an open directory.
Definition: fs_interface.h:67
void * dirp
Definition: fs_interface.h:68
Structure to receive file or directory information.
Definition: fs.h:107
File System interface structure.
Definition: fs_sys.h:42
int(* unmount)(struct fs_mount_t *mountp)
Definition: fs_sys.h:60
int(* lseek)(struct fs_file_t *filp, off_t off, int whence)
Definition: fs_sys.h:49
int(* mount)(struct fs_mount_t *mountp)
Definition: fs_sys.h:59
ssize_t(* write)(struct fs_file_t *filp, const void *src, size_t nbytes)
Definition: fs_sys.h:47
int(* unlink)(struct fs_mount_t *mountp, const char *name)
Definition: fs_sys.h:61
int(* statvfs)(struct fs_mount_t *mountp, const char *path, struct fs_statvfs *stat)
Definition: fs_sys.h:67
off_t(* tell)(struct fs_file_t *filp)
Definition: fs_sys.h:50
int(* opendir)(struct fs_dir_t *dirp, const char *fs_path)
Definition: fs_sys.h:55
int(* open)(struct fs_file_t *filp, const char *fs_path, fs_mode_t flags)
Definition: fs_sys.h:44
int(* stat)(struct fs_mount_t *mountp, const char *path, struct fs_dirent *entry)
Definition: fs_sys.h:65
int(* truncate)(struct fs_file_t *filp, off_t length)
Definition: fs_sys.h:51
ssize_t(* read)(struct fs_file_t *filp, void *dest, size_t nbytes)
Definition: fs_sys.h:46
int(* mkdir)(struct fs_mount_t *mountp, const char *name)
Definition: fs_sys.h:64
int(* readdir)(struct fs_dir_t *dirp, struct fs_dirent *entry)
Definition: fs_sys.h:56
int(* closedir)(struct fs_dir_t *dirp)
Definition: fs_sys.h:57
int(* sync)(struct fs_file_t *filp)
Definition: fs_sys.h:52
int(* close)(struct fs_file_t *filp)
Definition: fs_sys.h:53
int(* rename)(struct fs_mount_t *mountp, const char *from, const char *to)
Definition: fs_sys.h:62
File object representing an open file.
Definition: fs_interface.h:53
File system mount info structure.
Definition: fs.h:83
Structure to receive volume statistics.
Definition: fs.h:124
Definition: stat.h:39