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

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