matraux/filesystem

A PHP 8.4+ library for object-oriented file and folder manipulation with support for PSR-7 and Nette\Http\FileUpload.

Maintainers

Package info

github.com/matraux/filesystem

pkg:composer/matraux/filesystem

Statistics

Installs: 282

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

3.0.0 2026-03-12 13:52 UTC

This package is auto-updated.

Last update: 2026-03-13 10:38:09 UTC


README

Latest Version on Packagist Last release License: MIT PHP Security Policy Contributing QA Status Issues Last Commit


Introduction

A PHP 8.4+ library that simplifies file and folder operations using an object-oriented API. Supports renaming, moving, streaming, and deletion with optional integration for PSR-7 and Nette\Http\FileUpload.


Features

  • File and folder manipulation with fluent API
  • Relative and absolute path resolution
  • File iteration via chunks (stream-style)
  • Automatic cleanup of temporary files
  • PSR-7 stream support Psr\Http\Message\StreamInterface
  • Nette FileUpload support Nette\Http\FileUpload
  • Easy extension via inheritance

Installation

composer require matraux/filesystem

Requirements

version PHP Note
1.0.0 7.4+ Support PHP 7.4
2.0.0 8.3+ Support PHP 8.3
3.0.0 8.4+ Support PHP 8.4

Examples

See File for advanced instructions.

use Matraux\FileSystem\File\File;

$file = File::fromPath('C:\Users\MATRAUX\Webs\Resources\FileSystem\log.txt');
echo $file->name;  // "log.txt"

See Folder for advanced instructions.

use Matraux\FileSystem\Folder\Folder;

$folder = Folder::fromPath()->addPath('backup');
echo $folder->absolute; // "C:\Users\MATRAUX\Webs\Resources\FileSystem\backup"

Development

See Development for debug, test instructions, static analysis, and coding standards.


Support

For bug reports and feature requests, please use the issue tracker.