A simple library for read, create, manipulate folders / directories.
Composer (https://getcomposer.org/) and (https://packagist.org/)
composer require helionogueir/foldercreator
Tool for create directory
use helionogueir\foldercreator\folder\Create;
$pathname = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "helionogueir_foldercreator_folder_create";
(new Create())->mkdir($pathname);
Tool for create directory
use helionogueir\foldercreator\folder\Delete;
$pathname = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "helionogueir_foldercreator_folder_create";
(new Delete())->rm($pathname);
Tool for create directory
use helionogueir\foldercreator\tool\AccessMode;
use helionogueir\foldercreator\folder\Create;
$pathname = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "helionogueir_foldercreator_folder_create";
(new Create())->mkdir($pathname, AccessMode::MOD_0777);
Tool for create directory
use helionogueir\foldercreator\tool\Path;
$pathname = "pathnam/to\\file/or\\directory";
echo Path::replaceOSSeparator($pathname);
PHPUnit (https://phpunit.de/)
phpunit -c ./foldercreator/tests/unit.xml