makasim/temp-file

Temp file object

0.2.0 2013-07-12 06:09 UTC

This package is auto-updated.

Last update: 2024-10-06 23:44:43 UTC


README

TempFile extends SplFileInfo class. It represents temporary file which will be removed at script shutdown.

Examples:

<?php

//generate
$file = \Makasim\File\TempFile::generate();

//or create a temporary copy of persisted file
$file = \Makasim\File\TempFile::from('path_to_persisted_file');

//prevent file being removed
$file = \Makasim\File\TempFile::generate();

$file->persist();