emgag/flysystem-tempdir

此包已被废弃,不再维护。未建议替代包。

Flysystem 自毁临时目录适配器

v3.0.0 2022-06-02 10:17 UTC

This package is auto-updated.

Last update: 2024-03-28 16:11:50 UTC


README

build Software License Packagist Version

这是一个 Flysystem 文件系统抽象库的适配器,该库在本地文件系统上创建一个临时目录,并在对象销毁时自动删除。

安装

composer require emgag/flysystem-tempdir

用法

作为 League\Flysystem\Filesystem 包装器

use Emgag\Flysystem\Tempdir;
$fs = new Tempdir($prefix = '', $tempdir = null, $destruct = true);
// fully qualified FS path
$fsPath = $fs->getPath();

或作为 Flysystem 适配器

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();

许可证

flysystem-tempdir 采用 MIT 许可证