| @@ 91-99 (lines=9) @@ | ||
| 88 | * @param string $path |
|
| 89 | * @return bool |
|
| 90 | */ |
|
| 91 | protected function remove($path) { |
|
| 92 | if ($this->is_dir($path)) { |
|
| 93 | return $this->rmdir($path); |
|
| 94 | } elseif ($this->is_file($path)) { |
|
| 95 | return $this->unlink($path); |
|
| 96 | } else { |
|
| 97 | return false; |
|
| 98 | } |
|
| 99 | } |
|
| 100 | ||
| 101 | public function is_dir($path) { |
|
| 102 | return $this->filetype($path) === 'dir'; |
|
| @@ 235-243 (lines=9) @@ | ||
| 232 | return \file_put_contents($this->getSourcePath($path), $data); |
|
| 233 | } |
|
| 234 | ||
| 235 | public function unlink($path) { |
|
| 236 | if ($this->is_dir($path)) { |
|
| 237 | return $this->rmdir($path); |
|
| 238 | } elseif ($this->is_file($path)) { |
|
| 239 | return \unlink($this->getSourcePath($path)); |
|
| 240 | } else { |
|
| 241 | return false; |
|
| 242 | } |
|
| 243 | } |
|
| 244 | ||
| 245 | public function rename($path1, $path2) { |
|
| 246 | $srcParent = \dirname($path1); |
|