arduino-emulator
Loading...
Searching...
No Matches
LittleFS.h
1/*
2 LittleFS.h
3 Copyright (c) 2026 Phil Schatzmann. All right reserved.
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14*/
15#pragma once
16#include "DirectoryFS.h"
17
21#ifndef LITTLEFS_ROOT
22# define LITTLEFS_ROOT "."
23#endif
24
31class LittleFSClass : public DirectoryFS {
32 public:
33 LittleFSClass() : DirectoryFS("LITTLEFS_ROOT", LITTLEFS_ROOT) {}
34 bool begin(bool formatOnFail = false, const char* basePath = "/littlefs",
35 uint8_t maxOpenFiles = 10, const char* partitionLabel = "spiffs") {
36 return beginRoot();
37 }
38};
39
40inline LittleFSClass LittleFS;
bool beginRoot()
Determines the root directory: the environment variable or the default.
Definition DirectoryFS.h:35
ESP32/ESP8266/RP2040 compatible LittleFS which is a directory of the computer: LittleFS....
Definition LittleFS.h:31