Skip to content

RaftFileManagerSysMod

Rob Dobson edited this page May 3, 2026 · 1 revision

FileManager SysMod

Built-in SysMod that mounts a local flash file system (LittleFS or SPIFFS), optionally an SD card, and exposes file-system operations as REST endpoints.

Source: RaftSysMods/components/FileManager/

What it provides

  • Mount of local (LittleFS or SPIFFS) and optionally sd.
  • File listing, read, delete, upload (HTTP and chunked-RICREST) and full reformat.
  • Routing of incoming FileBlock chunks to ProtocolExchange when uploads come over BLE/serial.

SysType configuration

{
    "name": "FileManager",
    "LocalFsDefault": "littlefs",
    "LocalFsFormatIfCorrupt": 1,
    "SDEnabled": 0,
    "DefaultSD": 0,
    "CacheFileSysInfo": 0,
    "SDMOSI": "",
    "SDMISO": "",
    "SDCLK": "",
    "SDCS": ""
}
Key Default Meaning
LocalFsDefault "littlefs" Local FS driver: "littlefs" or "spiffs"
LocalFsFormatIfCorrupt true Auto-format if mount fails
SDEnabled false Enable SPI SD card mount
DefaultSD false When set, default file ops resolve to the SD card if present
CacheFileSysInfo false Cache directory listings between calls
SDMOSI / SDMISO / SDCLK / SDCS "" SD SPI pins (named pin or numeric string)

REST endpoints exposed

In all paths the file system name (local or sd) is the first path segment after the verb; folders use ~ instead of /.

Endpoint Method Purpose
reformatfs/<fs> GET Reformat a file system — destructive
filelist/<fs>/<folder> GET List directory contents as JSON
fileread/<fs>/<path> GET Read file contents
filedelete/<fs>/<path> GET Delete a file
fileupload POST Upload a file (HTTP multipart or RICREST chunked)

Related

Clone this wiki locally