Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 final class TempFile
00013 {
00014 private $path = null;
00015
00016 public function __construct(
00017 $directory = 'temp-garbage/', $prefix = 'TmpFile'
00018 )
00019 {
00020 $this->path = FileUtils::makeTempFile($directory, $prefix);
00021 }
00022
00023 public function __destruct()
00024 {
00025 try {
00026 unlink($this->path);
00027 } catch (BaseException $e) {
00028
00029 }
00030 }
00031
00032 public function getPath()
00033 {
00034 return $this->path;
00035 }
00036 }
00037 ?>