| @@ 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'; |
|
| @@ 212-221 (lines=10) @@ | ||
| 209 | return file_put_contents($this->getSourcePath($path), $data); |
|
| 210 | } |
|
| 211 | ||
| 212 | public function unlink($path) { |
|
| 213 | if ($this->is_dir($path)) { |
|
| 214 | return $this->rmdir($path); |
|
| 215 | } else if ($this->is_file($path)) { |
|
| 216 | return unlink($this->getSourcePath($path)); |
|
| 217 | } else { |
|
| 218 | return false; |
|
| 219 | } |
|
| 220 | ||
| 221 | } |
|
| 222 | ||
| 223 | public function rename($path1, $path2) { |
|
| 224 | $srcParent = dirname($path1); |
|