makasim / temp-file
临时文件对象
0.2.0
2013-07-12 06:09 UTC
Requires
- php: >=5.3.2
This package is auto-updated.
Last update: 2024-09-06 23:32:19 UTC
README
TempFile 扩展 SplFileInfo 类。它表示将在脚本关闭时被删除的临时文件。
示例
<?php //generate $file = \Makasim\File\TempFile::generate(); //or create a temporary copy of persisted file $file = \Makasim\File\TempFile::from('path_to_persisted_file'); //prevent file being removed $file = \Makasim\File\TempFile::generate(); $file->persist();