Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 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';

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

@@ 224-233 (lines=10) @@
221
		return file_put_contents($this->getSourcePath($path), $data);
222
	}
223
224
	public function unlink($path) {
225
		if ($this->is_dir($path)) {
226
			return $this->rmdir($path);
227
		} else if ($this->is_file($path)) {
228
			return unlink($this->getSourcePath($path));
229
		} else {
230
			return false;
231
		}
232
233
	}
234
235
	public function rename($path1, $path2) {
236
		$srcParent = dirname($path1);