azjezz/psl
PSL (PHP Standard Library) offers a consistent, well-typed set of safer, async-ready APIs to replace PHP primitives. Covers async, collections, networking, I/O, cryptography, terminal UI, and type-safe data validation with predictable errors.
The Filesystem component provides type-safe functions for common file system operations. It replaces PHP's procedural file functions with proper error handling through exceptions, clear parameter types, and consistent behavior.
Unlike the File component (which deals with reading and writing file contents through handles), Filesystem focuses on managing files and directories themselves: checking existence, creating, copying, deleting, and inspecting metadata.
@example('io/filesystem-exists.php')
@example('io/filesystem-create.php')
@example('io/filesystem-copy-delete.php')
@example('io/filesystem-metadata.php')
@example('io/filesystem-symlinks.php')
@example('io/filesystem-paths.php')
@example('io/filesystem-read-directory.php')
All operations throw specific exceptions on failure:
@example('io/filesystem-error-handling.php')
See src/Psl/Filesystem/ for the full API.
How can I help you explore Laravel packages today?