47 static std::string
binaryPath(
const std::string&
id);
52 static std::string
wasmPath(
const std::string&
id);
57 static std::string
aotPath(
const std::string&
id);
62 static std::string
metaPath(
const std::string&
id);
67 static std::string
langPath(
const std::string&
id);
82 static bool setDisabled(
const std::string&
id,
bool disabled);
87 static bool stats(uint64_t& free_bytes, uint64_t& total_bytes);
111 static bool blockRead(uint32_t lba, uint32_t offset,
void* buf, uint32_t len);
124 static bool blockWrite(uint32_t lba, uint32_t offset,
const void* buf, uint32_t len);
static bool blockWrite(uint32_t lba, uint32_t offset, const void *buf, uint32_t len)
Erases and writes raw bytes to the wear-levelling logical space.
static bool mount()
Mount the plugins partition. Auto-formats if empty.
static const char * basePath()
Returns the VFS path prefix, e.g. "/vfat".
static uint16_t blockSize()
Logical sector size of the vfat volume in bytes (MSC block size).
static std::string langPath(const std::string &id)
Returns the full VFS path of <id>.lang (translation overlay).
static void unmount()
Unmount the plugins partition (rarely used; mostly tests).
static std::string aotPath(const std::string &id)
Returns the full VFS path of <id>.aot.
static bool stats(uint64_t &free_bytes, uint64_t &total_bytes)
Returns the free and total bytes on the plugins partition.
static bool blockRead(uint32_t lba, uint32_t offset, void *buf, uint32_t len)
Reads raw bytes from the wear-levelling logical space.
static bool isDisabled(const std::string &id)
True when the plugin has a persistent disabled marker.
static bool setDisabled(const std::string &id, bool disabled)
Create or remove the persistent disabled marker for a plugin.
static std::string disabledPath(const std::string &id)
Returns the full VFS path of <id>.disabled.
static void setHostActive(bool active)
Marks whether a USB host currently holds the volume over MSC.
static void protectSystemDir()
Applies advisory read-only + hidden + system FAT attributes to the system folder so standard host fil...
static std::vector< std::string > listPluginIds()
Discover all installed plugin ids. A plugin is recognised by the presence of both <id>....
static uint64_t blockTotalBytes()
Total accessible size of the vfat volume in bytes.
static bool hostActive()
Reports whether a USB host currently holds the volume over MSC.
static std::string wasmPath(const std::string &id)
Returns the full VFS path of <id>.wasm.
static void remountIfPending()
Performs a deferred remount scheduled by setHostActive(false).
static std::string metaPath(const std::string &id)
Returns the full VFS path of <id>.meta.
static std::string binaryPath(const std::string &id)
Returns the path that should be loaded for <id>: <id>.aot if it exists on disk, otherwise <id>....