Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
fs_interface.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 Intel Corporation.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_FS_FS_INTERFACE_H_
8#define ZEPHYR_INCLUDE_FS_FS_INTERFACE_H_
9
10#include <stdint.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#if (CONFIG_FILE_SYSTEM_MAX_FILE_NAME - 0) > 0
17#define MAX_FILE_NAME CONFIG_FILE_SYSTEM_MAX_FILE_NAME
18#else /* CONFIG_FILE_SYSTEM_MAX_FILE_NAME */
19/* Select from enabled file systems */
20#if defined(CONFIG_FILE_SYSTEM_LITTLEFS)
21#define MAX_FILE_NAME 256
22#elif defined(CONFIG_FAT_FILESYSTEM_ELM)
23#if defined(CONFIG_FS_FATFS_LFN)
24#define MAX_FILE_NAME CONFIG_FS_FATFS_MAX_LFN
25#else /* CONFIG_FS_FATFS_LFN */
26#define MAX_FILE_NAME 12 /* Uses 8.3 SFN */
27#endif /* CONFIG_FS_FATFS_LFN */
28#else /* filesystem selection */
29/* Use standard 8.3 when no filesystem is explicitly selected */
30#define MAX_FILE_NAME 12
31#endif /* filesystem selection */
32#endif /* CONFIG_FILE_SYSTEM_MAX_FILE_NAME */
33
34
35/* Type for fs_open flags */
37
38struct fs_mount_t;
39
53struct fs_file_t {
54 void *filep;
55 const struct fs_mount_t *mp;
57};
58
67struct fs_dir_t {
68 void *dirp;
69 const struct fs_mount_t *mp;
70};
71
76#ifdef __cplusplus
77}
78#endif
79
80#endif /* ZEPHYR_INCLUDE_FS_FS_INTERFACE_H_ */
uint8_t fs_mode_t
Definition: fs_interface.h:36
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
Directory object representing an open directory.
Definition: fs_interface.h:67
const struct fs_mount_t * mp
Definition: fs_interface.h:69
void * dirp
Definition: fs_interface.h:68
File object representing an open file.
Definition: fs_interface.h:53
fs_mode_t flags
Definition: fs_interface.h:56
void * filep
Definition: fs_interface.h:54
const struct fs_mount_t * mp
Definition: fs_interface.h:55
File system mount info structure.
Definition: fs.h:83