Skip to content

Commit 41dda22

Browse files
update filesystem layout
1 parent 3f42ad7 commit 41dda22

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

docs/architecture/filesystem.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ MicroPythonOS uses a structured filesystem to organize apps, data, and resources
88
- **builtin/**: Read-only filesystem compiled into the OS, mounted at boot by `main.py`.
99
- **apps/**: See [Built-in Apps](../apps/built-in-apps.md).
1010
- **res/**: Resources (icons, fonts, etc.).
11-
- **cache/**: Temporary files for each app. Deleted when the app is uninstalled, and may also be deleted without uninstalling the app to free up space.
11+
- **cache/**: Temporary files for each app. Deleted when the app is uninstalled, but may also be deleted to free up space when the filesystem is almost full, without the app being uninstalled.
12+
- **org.yourdomain.yourapp/**: Files cached by the `org.yourdomain.yourapp` app, such as large audio files or images that are nice to cache, but can be re-downloaded if needed.
1213
- **data/**: Content files independent of specific apps (images, audio, recordings, etc.). Used by apps like Camera, ImageView, Sound Recorder, and Music Player.
1314
- **lib/**: Libraries and frameworks
1415
- **mpos/**: MicroPythonOS libraries and frameworks
@@ -17,7 +18,17 @@ MicroPythonOS uses a structured filesystem to organize apps, data, and resources
1718
- **com.micropythonos.helloworld/**: App-specific storage (e.g., `config.json`)
1819
- **com.micropythonos.settings/**: Storage used by the built-in Settings App
1920
- **com_micropythonos_nostr/**: Storage for the Nostr App
21+
- **sdcard/**: Mount point for an optional (micro) SD card that may be inserted.
2022

2123
This structure ensures a clear separation between system resources, apps, and user data.
2224

23-
When creating packages, use `_` instead of `.` in names (e.g., `com_micropythonos_nostr`), since `.` has special meaning in Python module imports.
25+
**Note**: When creating packages, use `_` instead of `.` in names (e.g., `com_micropythonos_nostr`), since `.` has special meaning in Python module imports.
26+
27+
## External storage layout
28+
29+
A similar structure should be used on additional storage devices, such as a micro SD card.
30+
31+
For example, **sdcard/cache/org.yourdomain.yourapp** should be used to cache files which may similarly be deleted to free up space when the filesystem is almost full.
32+
33+
Currently, **sdcard/apps** is not yet used to search for and install apps but it's likely that it will be, in a future release.
34+

0 commit comments

Comments
 (0)