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 
9 #pragma once
10 
26 #include <stddef.h>
27 #include <stdint.h>
28 
29 #include "vfs.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
38 typedef struct {
39  const char *path;
40  const size_t size;
41  const void *data;
43 
47 typedef struct {
48  const size_t nfiles;
50 } constfs_t;
51 
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
const vfs_file_system_t constfs_file_system
ConstFS file system driver.
A file in ConstFS (file name + contents)
Definition: constfs.h:38
const void * data
pointer to file contents
Definition: constfs.h:41
const char * path
file system relative path to file
Definition: constfs.h:39
const size_t size
length of data
Definition: constfs.h:40
ConstFS file system superblock.
Definition: constfs.h:47
const size_t nfiles
Number of files.
Definition: constfs.h:48
const constfs_file_t * files
Files array.
Definition: constfs.h:49
A file system driver.
Definition: vfs.h:374