Lines Matching refs:file

19     protected $file = '';  variable in splitbrain\\PHPArchive\\Tar
49 * @param string $file
53 public function open($file) argument
55 $this->file = $file;
59 $this->setCompression($this->complevel, $this->filetype($file));
64 $this->fh = @gzopen($this->file, 'rb');
66 $this->fh = @bzopen($this->file, 'r');
68 $this->fh = @fopen($this->file, 'rb');
72 throw new ArchiveIOException('Could not open file for reading: '.$this->file);
91 if ($this->closed || !$this->file) {
138 if ($this->closed || !$this->file) {
208 * @param string $file
212 public function create($file = '') argument
214 $this->file = $file;
218 if ($this->file) {
221 $this->setCompression($this->complevel, $this->filetype($file));
225 $this->fh = @gzopen($this->file, 'wb'.$this->complevel);
227 $this->fh = @bzopen($this->file, 'w');
229 $this->fh = @fopen($this->file, 'wb');
233 throw new ArchiveIOException('Could not open file for writing: '.$this->file);
243 * @param string $file path to the original file
249 public function addFile($file, $fileinfo = '') argument
252 $fileinfo = FileInfo::fromPath($file, $fileinfo);
267 $fp = @fopen($file, 'rb');
269 throw new ArchiveIOException('Could not open file for reading: ' . $file);
287 …throw new ArchiveCorruptedException("The size of $file changed while reading, archive corrupted. r…
351 if ($this->file) {
360 $this->file = '';
397 * @param string $file
401 public function save($file) argument
404 $this->setCompression($this->complevel, $this->filetype($file));
407 if (!@file_put_contents($file, $this->getArchive())) {
408 throw new ArchiveIOException('Could not write to file: '.$file);
438 if (!$this->file) {
515 $file = basename($name);
517 if (strlen($file) > 100 || strlen($dir) > 155) {
527 $name = $file;
668 * @param string $file
671 public function filetype($file) argument
674 if(file_exists($file) && is_readable($file) && filesize($file) > 5) {
675 $fh = @fopen($file, 'rb');
685 $file = strtolower($file);
686 if (substr($file, -3) == '.gz' || substr($file, -4) == '.tgz') {
688 } elseif (substr($file, -4) == '.bz2' || substr($file, -4) == '.tbz') {