AppserverIo\Appserver\Core\AbstractExtractor::soakArchive PHP Method

soakArchive() public method

(non-PHPdoc)
See also: AppserverIo\Appserver\Core\Interfaces\ExtractorInterface::soakArchive()
public soakArchive ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, SplFileInfo $archive ) : void
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container the archive belongs to
$archive SplFileInfo The archive to be soaked
return void
    public function soakArchive(ContainerNodeInterface $containerNode, \SplFileInfo $archive)
    {
        // prepare the upload target in the deploy directory
        $target = $this->getDeployDir($containerNode, $archive->getFilename());
        // move the uploaded file from the tmp to the deploy directory
        rename($archive->getPathname(), $target);
        // mark the file to be deployed with the next restart
        $this->flagArchive(new \SplFileInfo($target), ExtractorInterface::FLAG_DODEPLOY);
    }