public function decompress(LocalFileNodeInterface $node, array $options = [])
    {
        $pathInfo = pathinfo($node->getPath());

        if (!$node->exists()) {
            throw new InvalidArgumentException("The file: $node does not exist");
        }

        $outputFile = $node->getClone()
                           ->setPath($pathInfo['dirname'] . '/' . $pathInfo['filename'])
                           ->setCompression(CompressionFactory::TYPE_NONE);

        $this->log(LogLevel::INFO, "DeCompressing file: {file} into {target} using {compression}", [
            'file'        => $node,
            'target'      => $outputFile,
            'compression' => $this->getName(),
        ]);

        $cmd = $this->getDecompressCommand($node, $outputFile);

        $keepOld = (isset($options['keepOldFile'])) ? $options['keepOldFile'] : true;

        return $this->processFile($node, $outputFile, $cmd, $keepOld);
    }
public function decompress(LocalFileNodeInterface $node, array $options = [])
    {
        $pathInfo = pathinfo($node->getPath());

        if (!$node->exists()) {
            throw new InvalidArgumentException("The file: $node does not exist");
        }

        $outputFile = $node->getClone()
                           ->setPath($pathInfo['dirname'] . '/' . $pathInfo['filename'])
                           ->setCompression(CompressionFactory::TYPE_NONE);

        $this->log(LogLevel::INFO, "DeCompressing file: {file} into {target} using {compression}", [
            'file'        => $node,
            'target'      => $outputFile,
            'compression' => $this->getName(),
        ]);

        $cmd = $this->getDecompressCommand($node, $outputFile);

        $keepOld = (isset($options['keepOldFile'])) ? $options['keepOldFile'] : true;

        return $this->processFile($node, $outputFile, $cmd, $keepOld);
    }
public function decompress ( LocalFileNodeInterface $ node , array $ options = [ ] ) { $ pathInfo = pathinfo ( $ node -> getPath ( ) ) ; if ( ! $ node -> exists ( ) ) { throw new InvalidArgumentException ( "The file: $node does not exist" ) ; } $ outputFile = $ node -> getClone ( ) -> setPath ( $ pathInfo [ 'dirname' ] . '/' . $ pathInfo [ 'filename' ] ) -> setCompression ( CompressionFactory :: TYPE_NONE ) ; $ this -> log ( LogLevel :: INFO , "DeCompressing file: {file} into {target} using {compression}" , [ 'file' => $ node , 'target' => $ outputFile , 'compression' => $ this -> getName ( ) , ] ) ; $ cmd = $ this -> getDecompressCommand ( $ node , $ outputFile ) ; $ keepOld = ( isset ( $ options [ 'keepOldFile' ] ) ) ? $ options [ 'keepOldFile' ] : true ; return $ this -> processFile ( $ node , $ outputFile , $ cmd , $ keepOld ) ; }
Decompress a file and return the decompressed file

@param LocalFileNodeInterface $node
@param array                  $options

@return LocalFileNodeInterface
Decompress a file and return the decompressed file