keboola/php-temp
最新稳定版本:2.0.1
Composer 安装命令:
composer require keboola/php-temp
包简介
Temp library handles application temporary files
关键字:
README 文档
README
This library provides an isolated temporary folder for an application. The library has methods for generating randomly named folders and files.
Usage
use Keboola\Temp\Temp; $temp = new Temp('prefix'); // Creates a file with unique name suffixed by 'suffix' $tempFile = $temp->createTmpFile('suffix'); echo 'Files are stored in: ' . $temp->getTmpFolder(); $temp->remove();
Available methods:
getTmpFolder-- Get the name of the temporary folder.createFile-- Create a named file in the temporary folder.createTmpFile-- Create a random file in the temporary folder.
Migration from version 1.0
- The temp folder is no longer deleted automatically in the destructor. It needs to
be removed explicitly by calling the
remove()method. - The public
setIdmethod was removed. This function was rarely used and is no longer available. - The public
initRunFoldermethod was removed. The folder is now initialized when used and there is no need to callinitRunFolderany more. - The protected
getTmpPathmethod is now private.
License
MIT licensed, see LICENSE file.
统计信息
- 总下载量: 388.02k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 31
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-09-30