Code Duplication    Length = 7-7 lines in 3 locations

lib/private/files/storage/common.php 1 location

@@ 172-178 (lines=7) @@
169
			$this->remove($path2);
170
			$dir = $this->opendir($path1);
171
			$this->mkdir($path2);
172
			while ($file = readdir($dir)) {
173
				if (!Filesystem::isIgnoredDir($file)) {
174
					if (!$this->copy($path1 . '/' . $file, $path2 . '/' . $file)) {
175
						return false;
176
					}
177
				}
178
			}
179
			closedir($dir);
180
			return true;
181
		} else {

lib/private/files/storage/mappedlocal.php 1 location

@@ 235-241 (lines=7) @@
232
			}
233
			$dir = $this->opendir($path1);
234
			$this->mkdir($path2);
235
			while ($file = readdir($dir)) {
236
				if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
237
					if (!$this->copy($path1 . '/' . $file, $path2 . '/' . $file)) {
238
						return false;
239
					}
240
				}
241
			}
242
			closedir($dir);
243
			return true;
244
		} else {

lib/private/files/view.php 1 location

@@ 650-656 (lines=7) @@
647
							$this->touch($path2, $this->filemtime($path1));
648
						}
649
						if (is_resource($dh)) {
650
							while (($file = readdir($dh)) !== false) {
651
								if (!Filesystem::isIgnoredDir($file)) {
652
									if (!$this->copy($path1 . '/' . $file, $path2 . '/' . $file, $preserveMtime)) {
653
										$result = false;
654
									}
655
								}
656
							}
657
						}
658
					} else {
659
						list($storage2, $internalPath2) = Filesystem::resolvePath($absolutePath2 . $postFix2);