Code Duplication    Length = 9-10 lines in 2 locations

lib/private/Files/Storage/Common.php 1 location

@@ 89-97 (lines=9) @@
86
	 * @param string $path
87
	 * @return bool
88
	 */
89
	protected function remove($path) {
90
		if ($this->is_dir($path)) {
91
			return $this->rmdir($path);
92
		} else if ($this->is_file($path)) {
93
			return $this->unlink($path);
94
		} else {
95
			return false;
96
		}
97
	}
98
99
	public function is_dir($path) {
100
		return $this->filetype($path) === 'dir';

lib/private/Files/Storage/Local.php 1 location

@@ 218-227 (lines=10) @@
215
		return file_put_contents($this->getSourcePath($path), $data);
216
	}
217
218
	public function unlink($path) {
219
		if ($this->is_dir($path)) {
220
			return $this->rmdir($path);
221
		} else if ($this->is_file($path)) {
222
			return unlink($this->getSourcePath($path));
223
		} else {
224
			return false;
225
		}
226
227
	}
228
229
	public function rename($path1, $path2) {
230
		$srcParent = dirname($path1);