Command Line Interface¶
Create, extract and inspect LittleFS filesystem images. Use one of the commands listed below, the ‘-h’ / ‘–help’ option can be used on each command to learn more about the usage.
usage: littlefs-python [-h] [--version] {create,extract,list} ...
Named Arguments¶
- --version
show program’s version number and exit
Available Commands¶
- command
Possible choices: create, extract, list
Sub-commands¶
create¶
Create LittleFS image from file/directory contents.
littlefs-python create [-h] [-v] [--name-max NAME_MAX] --block-size BLOCK_SIZE
[--compact] [--no-pad]
(--block-count BLOCK_COUNT | --fs-size FS_SIZE)
source [destination]
Positional Arguments¶
- source
Source file/directory-of-files to encode into a littlefs filesystem.
- destination
Output LittleFS filesystem binary image.
Default: lfs.bin
Named Arguments¶
- -v, --verbose
Default: 0
- --name-max
LittleFS max file path length. Defaults to LittleFS’s default (255).
Default: 255
- --block-size
LittleFS block size.
- --compact
Store all data in the beginning blocks.
Default: False
- --no-pad
Do not pad the binary to-size with 0xFF. Only valid with –compact.
Default: False
- --block-count
LittleFS block count
- --fs-size
LittleFS filesystem size. Accepts byte units; e.g. 1MB and 1048576 are equivalent.
extract¶
Extract LittleFS image contents to a directory.
littlefs-python extract [-h] [-v] [--name-max NAME_MAX] --block-size
BLOCK_SIZE
source [destination]
Positional Arguments¶
- source
Source LittleFS filesystem binary.
- destination
Destination directory. Defaults to current directory.
Default: .
Named Arguments¶
- -v, --verbose
Default: 0
- --name-max
LittleFS max file path length. Defaults to LittleFS’s default (255).
Default: 255
- --block-size
LittleFS block size.
list¶
List LittleFS image contents.
littlefs-python list [-h] [-v] [--name-max NAME_MAX] --block-size BLOCK_SIZE
source
Positional Arguments¶
- source
Source LittleFS filesystem binary.
Named Arguments¶
- -v, --verbose
Default: 0
- --name-max
LittleFS max file path length. Defaults to LittleFS’s default (255).
Default: 255
- --block-size
LittleFS block size.