denisyukphp/tmpfile-manager
Composer 安装命令:
composer require denisyukphp/tmpfile-manager
包简介
Temp file manager.
README 文档
README
Temp file manager.
Installation
You can install the latest version via Composer:
composer require denisyukphp/tmpfile-manager
This package requires PHP 8.0 or later.
Quick usage
Build a temp file manager and create a temp file:
<?php use TmpFileManager\TmpFileManagerBuilder; use TmpFile\TmpFileInterface; $tmpFileManager = (new TmpFileManagerBuilder()) ->withTmpFileDir(sys_get_temp_dir()) ->withTmpFilePrefix('php') ->build() ; /** @var TmpFileInterface $tmpFile */ $tmpFile = $tmpFileManager->create();
All temp files created the manager will be purged automatically by default.
Documentation
- Default configuration
- Creating temp files
- Loading temp files
- Removing temp files
- Auto-purging
- Check unclosed resources
- Garbage collection
- Lifecycle events
Read more about temp file on Habr.
统计信息
- 总下载量: 838
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 21
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2020-03-02