marko/filesystem-local

Local filesystem driver for Marko Framework

Maintainers

Package info

github.com/marko-php/marko-filesystem-local

Type:marko-module

pkg:composer/marko/filesystem-local

Statistics

Installs: 0

Dependents: 0

Suggesters: 1

Stars: 0

0.0.1 2026-03-25 17:53 UTC

This package is auto-updated.

Last update: 2026-03-25 21:07:43 UTC


README

Local filesystem driver--reads and writes files on disk with path traversal protection and atomic writes.

Installation

composer require marko/filesystem-local

This automatically installs marko/filesystem. Requires the ext-fileinfo PHP extension.

Quick Example

use Marko\Filesystem\Contracts\FilesystemInterface;

class ReportService
{
    public function __construct(
        private FilesystemInterface $filesystem,
    ) {}

    public function generateReport(
        string $name,
        string $contents,
    ): void {
        $this->filesystem->write(
            "reports/$name.pdf",
            $contents,
            ['visibility' => 'private'],
        );
    }
}

Documentation

Full usage, API reference, and examples: marko/filesystem-local