| @@ 96-109 (lines=14) @@ | ||
| 93 | /** |
|
| 94 | * {@inheritDoc} |
|
| 95 | */ |
|
| 96 | protected function readFile(/*# string */ $realPath) |
|
| 97 | { |
|
| 98 | $str = file_get_contents($realPath); |
|
| 99 | ||
| 100 | if (false === $str) { |
|
| 101 | $this->setError( |
|
| 102 | Message::get(Message::STR_OPENSTREAM_FAIL, $realPath), |
|
| 103 | Message::STR_OPENSTREAM_FAIL |
|
| 104 | ); |
|
| 105 | return null; |
|
| 106 | } |
|
| 107 | ||
| 108 | return $str; |
|
| 109 | } |
|
| 110 | ||
| 111 | /** |
|
| 112 | * {@inheritDoc} |
|
| @@ 123-135 (lines=13) @@ | ||
| 120 | * @return bool |
|
| 121 | * @access protected |
|
| 122 | */ |
|
| 123 | protected function removeDir( |
|
| 124 | /*# string */ $realPath, |
|
| 125 | /*# bool */ $keep = false |
|
| 126 | )/*# : bool */ { |
|
| 127 | if ($keep || @rmdir($realPath)) { |
|
| 128 | return true; |
|
| 129 | } else { |
|
| 130 | return $this->setError( |
|
| 131 | Message::get(Message::STR_DELETE_FAIL, $realPath), |
|
| 132 | Message::STR_DELETE_FAIL |
|
| 133 | ); |
|
| 134 | } |
|
| 135 | } |
|
| 136 | ||
| 137 | /** |
|
| 138 | * {@inheritDoc} |
|