pekkis / temporary-file-manager
Temporary file manager
Installs: 74 810
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: >=7.1
- symfony/filesystem: ~3.4|~4.0
Requires (Dev)
- phpunit/phpunit: ~7.3
This package is not auto-updated.
Last update: 2024-12-21 19:42:22 UTC
README
A manager for application's temporary files. Deletes per-request.
Quickstart
Status
Full maintenance mode. If you want to maintain, holler.
<?php use Pekkis\TemporaryFileManager\TemporaryFileManager; $fm = new TemporaryFileManager($someDirectoryPath); // Add some bytes $ret = $fm->add($someContent); // or add a file and it gets copied $ret2 = $fm->addFile($someFilePath); // Either way, you get a path to the temporary file var_dump($ret); // And when all the manager references are destroyed, typically at the end of a request, the files are deleted too. unset($fm);