@@ 78-88 (lines=11) @@ | ||
75 | * @param string $target |
|
76 | * @return Nip_Process |
|
77 | */ |
|
78 | public function unzip($target) |
|
79 | { |
|
80 | if (!is_dir($target)) { |
|
81 | mkdir($target, 0755, true); |
|
82 | } |
|
83 | ||
84 | $process = new Nip_Process("unzip {$this->_path} -d $target"); |
|
85 | $process->run(); |
|
86 | ||
87 | return $process; |
|
88 | } |
|
89 | ||
90 | public function download($filename = false, $contentType = false) |
|
91 | { |
@@ 248-256 (lines=9) @@ | ||
245 | return $this; |
|
246 | } |
|
247 | ||
248 | public function copyDirectory($source, $destination) |
|
249 | { |
|
250 | if (!is_dir($destination)) { |
|
251 | mkdir($destination, 0755, true); |
|
252 | } |
|
253 | $process = new Nip_Process("cp -R -f $source/* $destination"); |
|
254 | ||
255 | return $process->run(); |
|
256 | } |
|
257 | ||
258 | public function formatSize($bytes) |
|
259 | { |