takuya / php-mktempdir
make Temp directory in tmp with temp name and auto remove.
1.0
2021-07-04 15:33 UTC
Requires
- php: >=7.0
- takuya/php-rrmdir: ^1.0
Requires (Dev)
- ext-json: *
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-12-04 23:07:35 UTC
README
Make a Temp directory in SysTemp with temp_name and auto removed.
mktempdir function
This package provides a function mktempdir()
to your composer project.
<?php
require_once 'vendor/autoload.php';
$tempDir = mktempdir();
is_dir($tempDir);#=>true
The TempDir will be auto remove
$tempDir
will be auto removed by 'register_shutdown_function'.
system temp directory
mktempdir()
will make tempDir in your System Temp area by 'sys_get_temp_dir'.
Installing from GitHub.
composer config repositories.takuya/php-mktempdir vcs https://github.com/takuya/php-mktempdir
composer require takuya/php-rrmdir
Installing with packagist.
composer require takuya/php-mktempdir
composer install
test results.
testing
composer install
./vendor/bin/phpunit