iamgold / doublesfs
This This is a lightweight library of file system in PHP. It provides a simple interface to swift access file, so named DoublesFS.
Installs: 2 041
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.6.0
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);