Code Duplication    Length = 9-9 lines in 2 locations

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

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

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

@@ 234-242 (lines=9) @@
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
		} elseif ($this->is_file($path)) {
238
			return \unlink($this->getSourcePath($path));
239
		} else {
240
			return false;
241
		}
242
	}
243
244
	public function rename($path1, $path2) {
245
		$srcParent = \dirname($path1);