emgag / flysystem-tempdir
此包已被废弃,不再维护。未建议替代包。
Flysystem 自毁临时目录适配器
v3.0.0
2022-06-02 10:17 UTC
Requires
- php: ^7.4 || ^8.0 || ^8.1
- league/flysystem: ^2.0.0 || ^3.0.0
Requires (Dev)
- phpstan/phpstan: ^1.7
- phpunit/phpunit: ^9.5
- rector/rector: ^0.13.3
README
这是一个 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 许可证。