| @@ 88-96 (lines=9) @@ | ||
| 85 | * @param string $path |
|
| 86 | * @return bool |
|
| 87 | */ |
|
| 88 | protected function remove($path) { |
|
| 89 | if ($this->is_dir($path)) { |
|
| 90 | return $this->rmdir($path); |
|
| 91 | } else if ($this->is_file($path)) { |
|
| 92 | return $this->unlink($path); |
|
| 93 | } else { |
|
| 94 | return false; |
|
| 95 | } |
|
| 96 | } |
|
| 97 | ||
| 98 | public function is_dir($path) { |
|
| 99 | return $this->filetype($path) === 'dir'; |
|
| @@ 217-226 (lines=10) @@ | ||
| 214 | return file_put_contents($this->getSourcePath($path), $data); |
|
| 215 | } |
|
| 216 | ||
| 217 | public function unlink($path) { |
|
| 218 | if ($this->is_dir($path)) { |
|
| 219 | return $this->rmdir($path); |
|
| 220 | } else if ($this->is_file($path)) { |
|
| 221 | return unlink($this->getSourcePath($path)); |
|
| 222 | } else { |
|
| 223 | return false; |
|
| 224 | } |
|
| 225 | ||
| 226 | } |
|
| 227 | ||
| 228 | public function rename($path1, $path2) { |
|
| 229 | $srcParent = dirname($path1); |
|