Code Duplication    Length = 13-14 lines in 2 locations

apps/files_sharing/lib/sharedstorage.php 2 locations

@@ 186-198 (lines=13) @@
183
	 * @param string $path
184
	 * @return boolean
185
	 */
186
	public function rmdir($path) {
187
188
		// never delete a share mount point
189
		if (empty($path)) {
190
			return false;
191
		}
192
193
		if (($source = $this->getSourcePath($path)) && $this->isDeletable($path)) {
194
			list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source);
195
			return $storage->rmdir($internalPath);
196
		}
197
		return false;
198
	}
199
200
	public function opendir($path) {
201
		$source = $this->getSourcePath($path);
@@ 332-345 (lines=14) @@
329
	 * @param string $path
330
	 * @return boolean
331
	 */
332
	public function unlink($path) {
333
334
		// never delete a share mount point
335
		if (empty($path)) {
336
			return false;
337
		}
338
		if ($source = $this->getSourcePath($path)) {
339
			if ($this->isDeletable($path)) {
340
				list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source);
341
				return $storage->unlink($internalPath);
342
			}
343
		}
344
		return false;
345
	}
346
347
	public function rename($path1, $path2) {
348
		$this->init();