ralphjsmit/filesystem
A Laravel package that wraps filesystem operations in a clean, expressive API. Create, copy, move, delete, and inspect files and directories with readable methods, keeping common disk tasks simple and consistent across your app's storage disks.
Storage facade.Storage:: calls, this is a candidate to standardise on rather than fund a third internal utility. Exit cost is measured in hours, which keeps the decision reversible.FilesystemService interface with the package as an implementation detail. That seam — not the package — is the durable product decision, and it's what makes the dependency swappable in an afternoon.What this should not anchor: an org-wide storage abstraction. With zero known dependents and a long gap before the 1.4.0 release, there's no community backpressure and no downstream bug discovery happening on your behalf. The Laravel 10 release is a positive signal, not a substitute for an ecosystem. And it is not cover for skipping a storage abstraction — it's a thinner doorway to the same Flysystem layer, not a replacement for one.
Consider it when all of these hold:
Storage/Flysystem, so marginal risk is contained to a thin wrapper rather than a new subsystem.^1.4, with the reviewed version and date recorded in the PR or composer.json).Look elsewhere when:
Storage, which has explicit upgrade paths and security coverage.Adoption test (one sprint, timeboxed): convert five real internal call sites behind an internal FilesystemService interface on your target Laravel version. Verify Storage::fake() still works through your adapter — if fakes don't route through, the package has cost you test coverage to buy syntax, and native Storage wins the argument you're actually having. Deliberately trigger a write failure and confirm what exception you catch; a swallowed failure on an archival move is a silent data-loss path. Then judge whether the readability win is real rather than theoretical.
To executives: This is a small, MIT-licensed convenience library that makes common file operations more readable inside Laravel applications. It buys implementation speed on internal, low-risk features — admin exports, report generation, archival jobs — at a cost measured in hours to adopt and hours to remove. It is not a platform commitment, unlocks no new capability, and should not appear on any customer-facing or regulated path. Approve it as a tactical, reversible developer-productivity choice with a named owner and an annual review, or decline it and let the team keep using Laravel's built-in Storage — the downside of either decision is small, and that's the point.
To engineering: The pitch is entirely about ergonomics, and it only holds if we adopt it with discipline. Three non-negotiables: (1) it goes behind an internal FilesystemService interface — domain code, controllers, jobs, and commands never reference the package namespace directly, enforced by an architecture test or CI grep; (2) we pin ^1.4, require an explicit disk on every call, and never put package objects into serialized job payloads; (3) we verify two things before the first commit — that Storage::fake() still works through the adapter, and how failures surface (Flysystem exceptions, package wrapping, or swallowed booleans). Where the fluent chain isn't genuinely multi-step, plain Storage:: remains the right answer; wrapping a single put() buys nothing but an import.
To the adopting team: Start with one internal call site, read src/File.php and src/Directory.php yourself before designing against it, and leave a short note in the adapter class — version reviewed, native Storage equivalent of each method, and who signed off. That note is the artefact that turns a future swap into an afternoon instead of an archaeology exercise. Treat path-traversal handling as unverified: generate paths rather than accepting user-supplied segments, and keep this off any upload path where the user controls the filename. If the team won't commit to the seam and the lint rule, don't adopt it — a scattered dependency is worse than a slightly more verbose one.
How can I help you explore Laravel packages today?