rmb32 / filesystem
Barnspec Filesystem — generic file I/O primitives and PHP-class generation/writing, the one place raw filesystem I/O happens across the Barnspec ecosystem
Requires
- php: ^8.5
Requires (Dev)
- deptrac/deptrac: ^4.7
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^12.0
- squizlabs/php_codesniffer: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-07 18:34:38 UTC
README
Part of BarnSuite.
File storage, PHP class generation and Markdown-to-HTML conversion for
Barnspec tools. Barnspec uses it to read and write .barnspec/ JSON,
to write generated Port stubs, and to render story documents.
Requirements
- PHP 8.5+
Installation
composer require rmb32/filesystem
Usage
Each capability is obtained from a factory that returns only its contract:
use Rmb32\Filesystem\Api\Factory\FileStoreFactory;
use Rmb32\Filesystem\Api\Factory\MarkdownConverterFactory;
use Rmb32\Filesystem\Api\Factory\PhpClassWriterFactory;
$files = new FileStoreFactory()->create(); // read/write files and folders
$php = new PhpClassWriterFactory()->create(); // write a generated PHP class
$markdown = new MarkdownConverterFactory()->create(); // Markdown -> HTML
Describe what to write with the File, Folder, PhpClass, Method and
Parameter value objects under Rmb32\Filesystem\Api\ValueObject.
Related packages
- Barnspec — uses it for all its storage.
- Port Generator — uses it to write generated stubs.
- Menu — the other shared plumbing package.
More docs
Internals · History · Known issues
License
Proprietary. See LICENSE. Copyright (c) Roger Barnfather.