elFinder\elFinderVolumeLocalFileSystem::_archive PHP 메소드

_archive() 보호된 메소드

Create archive and return its path
저자: Dmitry (dio) Levashov,
저자: Alexey Sukhotin
protected _archive ( string $dir, array $files, string $name, array $arc ) : string | boolean
$dir string target dir
$files array files names list
$name string archive name
$arc array archiver options
리턴 string | boolean
    protected function _archive($dir, $files, $name, $arc)
    {
        $cwd = getcwd();
        chdir($dir);
        $files = array_map('escapeshellarg', $files);
        $cmd = $arc['cmd'] . ' ' . $arc['argc'] . ' ' . escapeshellarg($name) . ' ' . implode(' ', $files);
        $this->procExec($cmd, $o, $c);
        chdir($cwd);
        $path = $dir . DIRECTORY_SEPARATOR . $name;
        return file_exists($path) ? $path : false;
    }