takuya/php-mktempdir

make Temp directory in tmp with temp name and auto remove.

1.0 2021-07-04 15:33 UTC

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.

<CircleciTest>

testing

composer install 
./vendor/bin/phpunit