iamgold/doublesfs

There is no license information available for the latest version (1.0.3) of this package.

This This is a lightweight library of file system in PHP. It provides a simple interface to swift access file, so named DoublesFS.

1.0.3 2019-12-02 07:03 UTC

This package is auto-updated.

Last update: 2024-11-13 05:00:50 UTC


README

This This is a lightweight library of file system in PHP. It provides a simple interface to swift access file, so named DoublesFS.

Install

composer require iamgold/doublesfs

Support

  • Local disk storage
  • AWS S3 (comming soon)

Usage

use iamgold\doublesfs\storages\LocalStorage;

$config = [
    'sourcePath' => __DIR__ . '/source'
];

$storage = new LocalStorage($config);

// put file
(bool) $storage->put($source, $key, $options);

// put contents
(bool) $storage->putContents($contents, $key, $options);

// delete file
(bool) $storage->delete($key);