The local file system is on the ESP32 device, in its FLASH memory. It is used to store the WebUI files, config files and small gcode files for macros. The space is very limited, so not much can fit on it. It works very similar to the SD card with the commands being prefixed with LocalFS, rather than SD.
Note: The local file system is implemented with either SPIFFS or, going forward, LittleFS. Both are ways to store files in a FLASH device. If you see a reference to either SPIFFS or LittleFs, it is the same thing as LocalFS in this case.
By default the FluidNC webserver will refuse to fetch any files from the Flash filesystem (including reloading WebUI) unless your machine is idle. This prevents FS access from hogging FLASH bandwidth when the CPU might need to load more code to memory.
This safety measure is controlled by the$HTTP/BlockDuringMotionsetting (since v3.6.8).
Send $LocalFS/List. The results will look similar to the report below.
[FILE:/index.html.gz|SIZE:122477]
[FILE:/3axis_v4.yaml|SIZE:1762]
[FILE:/favicon.ico|SIZE:1150]
[Local FS Free:44.86 KB Used:124.52 KB Total:169.38 KB]
Send $LocalFS/Show=<filename>. This is a good way to check the contents of things like config files.
Example
$localfs/show=fluidnc_pen_laser_2209.yaml
name: TMC2209 XY Servo Laser
board: FluidNC Pen/Laser 2209
meta:
stepping:
engine: RMT
idle_ms: 255
...
ok
Send $LocalFS/Run=<filename>. This is used to run gcode files. Use this only for very short files like macros. Running long files from the local FLASH filesystem can cause system crashes due to conflicts with the ESP32's use of FLASH for running CPU instructions.
Send $LocalFS/Format. This will reformat the LocalFS. If you are having trouble loading files when there should be enough space, try reformatting.
Send $Localfs/Delete=<filename>
Example: $Localfs/Mkdir=/newdir and $Localfs/Mkdir=/folder1/newdir to put it into an existing folder.
You can delete a folder with the $Localfs/Delete command.
Send $Localfs/Rename=oldname>newname to rename an existing file on the localfs.
Send $LocalFS/Mkdir=<path> to create a directory, including any missing parent directories (FluidNC later than v4.1.1). $LocalFS/Delete deletes a directory and everything in it, and $LocalFS/Rename renames directories as well as files. $LocalFS/List shows the whole tree, with [DIR:...] lines for directories and contents indented by depth.
Send $LocalFS/Size. The results will look similar to the report below.
SPIFFS Total:169.38 KB Used:124.52 KB
You can access the LocalFS on the FluidNC tab. Click the green icon.