Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emgag/flysystem-tempdir
Flysystem adapter for a self-destroying temporary directory
https://github.com/emgag/flysystem-tempdir
flysystem flysystem-adapter php tempdir temporary
Last synced: 3 months ago
JSON representation
Flysystem adapter for a self-destroying temporary directory
- Host: GitHub
- URL: https://github.com/emgag/flysystem-tempdir
- Owner: emgag
- License: mit
- Archived: true
- Created: 2015-05-17T17:36:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-10-27T14:27:55.000Z (about 2 years ago)
- Last Synced: 2024-07-10T18:17:38.880Z (4 months ago)
- Topics: flysystem, flysystem-adapter, php, tempdir, temporary
- Language: PHP
- Homepage:
- Size: 31.3 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flysystem Adapter for Temporary Directory
![build](https://github.com/emgag/flysystem-tempdir/workflows/build/badge.svg)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
[![Packagist Version](https://img.shields.io/packagist/v/emgag/flysystem-tempdir.svg)](https://packagist.org/packages/emgag/flysystem-tempdir)An adapter for the [Flysystem](https://github.com/thephpleague/flysystem) file
system abstraction library which creates a temporary directory on local filesystem
and which is automatically removed again on object destruct.## Installation
```bash
composer require emgag/flysystem-tempdir
```## Usage
As League\Flysystem\Filesystem wrapper:
```php
use Emgag\Flysystem\Tempdir;
$fs = new Tempdir($prefix = '', $tempdir = null, $destruct = true);
// fully qualified FS path
$fsPath = $fs->getPath();
```or as Flysystem Adapter:
```php
use Emgag\Flysystem\TempdirAdapter;
use League\Flysystem\Filesystem;$adapter = new TempdirAdapter($prefix = '', $tempdir = null, $destruct = true);
$filesystem = new Filesystem($adapter);
// fully qualified FS path
$fsPath = $adapter->getPath();```
## License
flysystem-tempdir is licensed under the [MIT License](http://opensource.org/licenses/MIT).