$destPath = Paths::join($target, $subPath);
$result = true;
if ($fileinfo->isDir() && !file_exists($destPath)) {
$destPath = Paths::join($target, $subPath);
$result = true;
if ($fileinfo->isDir() && !file_exists($destPath)) {
$result = mkdir($destPath);
} else if ($fileinfo->isFile()) {
$result = copy($srcPath, $destPath);
$result = mkdir($destPath);
} else if ($fileinfo->isFile()) {
$result = copy($srcPath, $destPath);