| @@ 94-102 (lines=9) @@ | ||
| 91 | * @param string $path |
|
| 92 | * @return bool |
|
| 93 | */ |
|
| 94 | protected function remove($path) { |
|
| 95 | if ($this->is_dir($path)) { |
|
| 96 | return $this->rmdir($path); |
|
| 97 | } elseif ($this->is_file($path)) { |
|
| 98 | return $this->unlink($path); |
|
| 99 | } else { |
|
| 100 | return false; |
|
| 101 | } |
|
| 102 | } |
|
| 103 | ||
| 104 | public function is_dir($path) { |
|
| 105 | 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); |
|