Backend that routes file operations to different backends based on path prefix.
This enables hybrid storage strategies like:
/memories/ → StoreBackend (persistent, cross-thread)The CompositeBackend handles path prefix stripping/re-adding transparently.
class CompositeBackendDelete a file or directory, routing to appropriate backend.
Parent and root deletions run sequentially across the base backend and any mounted routes below the requested path. A failure stops the fan-out so later backends are left untouched, but earlier deletions cannot be rolled back and are reported as potentially partial.
Download multiple files, batching by backend for efficiency.
Edit a file, routing to appropriate backend.
Execute a command via the default backend. Execution is not path-specific, so it always delegates to the default backend.
Structured glob matching returning FileInfo objects.
Structured search results or error string for invalid input.
List files and directories in the specified directory (non-recursive).
Read file content, routing to appropriate backend.
Read file content as raw FileData.
Upload multiple files, batching by backend for efficiency.
Write content to a file, routing to appropriate backend.
Type guard — returns true if backend is a CompositeBackend.
Uses duck-typing on routePrefixes so it works across module boundaries
where instanceof may fail.