src/Tar.php
public function save($file)
    {
        if ($this->comptype === Archive::COMPRESS_AUTO) {
            $this->setCompression($this->complevel, $this->filetype($file));
        }

        if (!@file_put_contents($file, $this->getArchive())) {
            throw new ArchiveIOException('Could not write to file: '.$file);
        }
    }
public function save($file)
    {
        if ($this->comptype === Archive::COMPRESS_AUTO) {
            $this->setCompression($this->complevel, $this->filetype($file));
        }

        if (!@file_put_contents($file, $this->getArchive())) {
            throw new ArchiveIOException('Could not write to file: '.$file);
        }
    }
public function save ( $ file ) { if ( $ this -> comptype === Archive :: COMPRESS_AUTO ) { $ this -> setCompression ( $ this -> complevel , $ this -> filetype ( $ file ) ) ; } if ( ! @ file_put_contents ( $ file , $ this -> getArchive ( ) ) ) { throw new ArchiveIOException ( 'Could not write to file: ' . $ file ) ; } }
Save the created in-memory archive data

Note: It more memory effective to specify the filename in the create() function and
let the library work on the new file directly.

@param string $file
@throws ArchiveIOException
@throws ArchiveIllegalCompressionException
Save the created in - memory archive data