|
ProtoCore v0.0.2
Deterministic, zero-heap network stack for embedded targets
|
Unified virtual filesystem wrapper (PC_ENABLE_VFS). More...
Go to the source code of this file.
Unified virtual filesystem wrapper (PC_ENABLE_VFS).
One small file API the rest of the library and the application can target, backed by a pluggable store. Two backends ship:
fs::FS (LittleFS / SD / SPIFFS) for persistent storage. Mount it with pc_vfs_mount(pc_vfs_fs(&LittleFS)).The point is a single seam: a feature (a config store, the audit-log sink, a template loader, an upload target) calls pc_vfs_* and works against whichever backend the application mounted - RAM in tests, flash or SD in production - without knowing which. Handles are small ints the backend assigns; the API fails closed (-1 / false) when nothing is mounted or a bound is hit.
Single-accessor like the other services: use it from one context (a worker / loop), not concurrently.
Definition in file vfs.h.