Engine - Filesystems - Catalogue
The component itself: the Flysystem dependency, an immutable catalogue of named filesystems, and the
three the engine is given.
Parent: Engine - Filesystems.
Shape
FilesystemCatalogue is constructed from an array<string, FilesystemOperator> and resolves by name. It
is the catalogue half of the pattern used throughout, with no registry half, because nothing registers: a
filesystem is either given at construction or it does not exist.
That is the same state the container's catalogues are in today, built directly from arrays, so this
introduces no new shape.
Given filesystems
| Name |
Adapter |
Holds |
config |
local |
config.toml, config.d/, module config |
data |
local |
Engine and module data |
cache |
local |
Cached content, not includable output |
data and cache have no consumer yet. They are included because they are directories the engine
already names in Paths, and adding them later would mean revisiting every construction site.
The public type
get() returns League\Flysystem\FilesystemOperator, not an engine-owned interface. Module authors work
with filesystems directly, so the familiar type is the right one, and wrapping would cost twenty-one
delegating methods to maintain in step with a library that already has them.
Flysystem's own guarantees carry through unchanged: PathTraversalDetected and CorruptedPathDetected
from the path normaliser, and FilesystemException as a marker interface extending Throwable, which is
the convention ContainerException and ConfigException already follow.
Construction
There is no composition root, so the tests construct the catalogue. This is the same position Paths is
in: it exists, only tests build it, and its docblock describes a bootstrap that has not been written. The
wiring lands with bootstrap; nothing here should try to invent one.
Lifetime
Process lifetime. A local adapter holds no connection and is safe for the life of the worker. Whatever
adds the first remote adapter inherits #63's lifetime question and the trap ConnectionFactory fell
into, so it is recorded rather than solved here.
Boundaries
- No config-declared filesystems, no adapter factory, no
[filesystems] section.
- No remote adapters.
- No
MountManager, no module scoping, no path prefixing.
- No
TomlLoader changes. That is the migration card.
Tasks
Engine - Filesystems - Catalogue
The component itself: the Flysystem dependency, an immutable catalogue of named filesystems, and the
three the engine is given.
Parent:
Engine - Filesystems.Shape
FilesystemCatalogueis constructed from anarray<string, FilesystemOperator>and resolves by name. Itis the catalogue half of the pattern used throughout, with no registry half, because nothing registers: a
filesystem is either given at construction or it does not exist.
That is the same state the container's catalogues are in today, built directly from arrays, so this
introduces no new shape.
Given filesystems
configconfig.toml,config.d/, module configdatacachedataandcachehave no consumer yet. They are included because they are directories the enginealready names in
Paths, and adding them later would mean revisiting every construction site.The public type
get()returnsLeague\Flysystem\FilesystemOperator, not an engine-owned interface. Module authors workwith filesystems directly, so the familiar type is the right one, and wrapping would cost twenty-one
delegating methods to maintain in step with a library that already has them.
Flysystem's own guarantees carry through unchanged:
PathTraversalDetectedandCorruptedPathDetectedfrom the path normaliser, and
FilesystemExceptionas a marker interface extendingThrowable, which isthe convention
ContainerExceptionandConfigExceptionalready follow.Construction
There is no composition root, so the tests construct the catalogue. This is the same position
Pathsisin: it exists, only tests build it, and its docblock describes a bootstrap that has not been written. The
wiring lands with bootstrap; nothing here should try to invent one.
Lifetime
Process lifetime. A local adapter holds no connection and is safe for the life of the worker. Whatever
adds the first remote adapter inherits #63's lifetime question and the trap
ConnectionFactoryfellinto, so it is recorded rather than solved here.
Boundaries
[filesystems]section.MountManager, no module scoping, no path prefixing.TomlLoaderchanges. That is the migration card.Tasks
league/flysystemtorequire, andleague/flysystem-memorytorequire-devFilesystemCatalogueoverarray<string, FilesystemOperator>, resolving by name