derhasi / tempdirectory
Provides a representation of a temp directory that will destroy itself.
Installs: 2 603
Dependents: 5
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 1
Requires (Dev)
- composer/composer: 1.0.*@dev
- phpunit/phpunit: 4.*
This package is not auto-updated.
Last update: 2024-11-09 17:19:34 UTC
README
Provides a temporary directory object, that will kill remove the whole directory on destruction or shutdown.
Installation
Simpyl require with composer: composer require --dev derhasi/tempdirectory
.
Usage
Example from composer-preserver-paths:
$workingDirectory = new TempDirectory('path-preserver-test-working'); // Create directory to test. $folder1 = $this->workingDirectory->getPath('folder1'); mkdir($folder1); $file1 = $this->workingDirectory->getPath('file1.txt'); file_put_contents($file1, 'Test content');