siestacat/phpfilemanager

File manager library. Manage files by hash

1.0.11 2023-06-17 16:19 UTC

This package is auto-updated.

Last update: 2024-11-17 19:34:22 UTC


README

Install:

composer require siestacat/phpfilemanager

Example:

<?php

use Siestacat\Phpfilemanager\File\FileCommander;
use Siestacat\Phpfilemanager\File\Repository\Adapter\FileSystemAdapter;

$commander = new FileCommander(new FileSystemAdapter('./my_data_dir'));

$file = $commander->add('image.jpg');
$file = $commander->get($file->getHash());
if($commander->exists($file->getHash()))
{
    //TO-DO
}
$file = $commander->del($file->getHash());

Tests:

git clone https://github.com/SiestaCat/phpfilemanager.git
cd phpfilemanager
composer install
composer run-script test
```# phpfilemanager-api-client