Code Duplication    Length = 9-10 lines in 2 locations

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

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

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

@@ 234-243 (lines=10) @@
231
		return file_put_contents($this->getSourcePath($path), $data);
232
	}
233
234
	public function unlink($path) {
235
		if ($this->is_dir($path)) {
236
			return $this->rmdir($path);
237
		} else if ($this->is_file($path)) {
238
			return unlink($this->getSourcePath($path));
239
		} else {
240
			return false;
241
		}
242
243
	}
244
245
	public function rename($path1, $path2) {
246
		$srcParent = dirname($path1);