Components/IFS/src/include/IFS/SPIFFS/FileSystem.h File Reference
#include "../FileSystem.h"
#include "FileMeta.h"
#include <spiffs.h>
#include <spiffs_nucleus.h>
Include dependency graph for Components/IFS/src/include/IFS/SPIFFS/FileSystem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  IFS::SPIFFS::FileSystem
 

Namespaces

 IFS
 
 IFS::SPIFFS
 

Macros

#define FFS_MAX_FILEDESC   8
 

Macro Definition Documentation

◆ FFS_MAX_FILEDESC

#define FFS_MAX_FILEDESC   8

FileSystem.h Provides an IFS FileSystem implementation for SPIFFS.

Created on: 21 Jul 2018

Copyright 2019 mikee47 mike@.nosp@m.sill.nosp@m.yhous.nosp@m.e.ne.nosp@m.t

This file is part of the IFS Library

This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or later.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library. If not, see https://www.gnu.org/licenses/.

This is mostly a straightforward wrapper around SPIFFS, with a few enhancements:

Metadata caching

Metadata can be updated multiple times while a file is open so for efficiency it is kept in RAM and only written to SPIFFS on close or flush.

Directory emulation

SPIFFS stores all files in a flat format, so directory behaviour is emulated including opendir() and readdir() operations. Overall path length is fixed according to SPIFFS_OBJ_NAME_LEN.

File truncation

Standard IFS truncate() method allows file size to be reduced. This was added to Sming in version 4.