Changeset View
Changeset View
Standalone View
Standalone View
src/filesystem/PhutilDirectoryFixture.php
Show All 22 Lines | private function __construct() { | ||||
// <restricted> | // <restricted> | ||||
} | } | ||||
public function __destruct() { | public function __destruct() { | ||||
Filesystem::remove($this->path); | Filesystem::remove($this->path); | ||||
} | } | ||||
public function getPath($to_file = null) { | public function getPath($to_file = null) { | ||||
$to_file = phutil_string_cast($to_file); | |||||
return $this->path.'/'.ltrim($to_file, '/'); | return $this->path.'/'.ltrim($to_file, '/'); | ||||
} | } | ||||
public function saveToArchive($path) { | public function saveToArchive($path) { | ||||
$tmp = new TempFile(); | $tmp = new TempFile(); | ||||
execx( | execx( | ||||
'tar -C %s -czvvf %s .', | 'tar -C %s -czvvf %s .', | ||||
Show All 12 Lines |