constfs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Eistec AB
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
24 #ifndef FS_CONSTFS_H
25 #define FS_CONSTFS_H
26 
27 #include <stddef.h>
28 #include <stdint.h>
29 
30 #include "vfs.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
39 typedef struct {
40  const char *path;
41  const size_t size;
42  const uint8_t *data;
44 
48 typedef struct {
49  const size_t nfiles;
51 } constfs_t;
52 
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif /* FS_CONSTFS_H */
65 
constfs_t::files
const constfs_file_t * files
Files array.
Definition: constfs.h:50
constfs_file_t
A file in ConstFS (file name + contents)
Definition: constfs.h:39
constfs_t::nfiles
const size_t nfiles
Number of files.
Definition: constfs.h:49
constfs_t
ConstFS file system superblock.
Definition: constfs.h:48
constfs_file_t::path
const char * path
file system relative path to file
Definition: constfs.h:40
constfs_file_t::size
const size_t size
length of data
Definition: constfs.h:41
constfs_file_t::data
const uint8_t * data
pointer to file contents
Definition: constfs.h:42
vfs_file_system_t
A file system driver.
Definition: vfs.h:256
vfs.h
VFS layer API declarations.
constfs_file_system
const vfs_file_system_t constfs_file_system
ConstFS file system driver.