Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 97-105 (lines=9) @@
94
	 * @param string $path
95
	 * @return bool
96
	 */
97
	protected function remove($path) {
98
		if ($this->is_dir($path)) {
99
			return $this->rmdir($path);
100
		} else if ($this->is_file($path)) {
101
			return $this->unlink($path);
102
		} else {
103
			return false;
104
		}
105
	}
106
107
	public function is_dir($path) {
108
		return $this->filetype($path) === 'dir';

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

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