@@ 427-437 (lines=11) @@ | ||
424 | * @param string $dirname |
|
425 | * @return string FALSE on fail |
|
426 | */ |
|
427 | public function getDirectory($dirname) |
|
428 | { |
|
429 | if ($this->numDirectories > 0) { |
|
430 | foreach ($this->directories as $information) { |
|
431 | if ($information['name'] == $dirname) { |
|
432 | return $information; |
|
433 | } |
|
434 | } |
|
435 | } |
|
436 | return false; |
|
437 | } |
|
438 | ||
439 | /** |
|
440 | * Check if this tar archive contains a specific file |
|
@@ 463-473 (lines=11) @@ | ||
460 | * @param string $dirname |
|
461 | * @return bool |
|
462 | */ |
|
463 | public function containsDirectory($dirname) |
|
464 | { |
|
465 | if ($this->numDirectories > 0) { |
|
466 | foreach ($this->directories as $information) { |
|
467 | if ($information['name'] == $dirname) { |
|
468 | return true; |
|
469 | } |
|
470 | } |
|
471 | } |
|
472 | return false; |
|
473 | } |
|
474 | ||
475 | /** |
|
476 | * Add a directory to this tar archive |