if ($offset == 0
) { if ($localFs->
has($backupDirRelative)) { $localFs->
rename($backupDirRelative,
rtrim($backupDirRelative, '/'
) .
uniqid());
} // Maybe we have to create backup dir here:
$localFs->
write($backupDirRelative . 'dummy', 'dummyfile'
);
} $iterator =
new RecursiveIteratorIterator( new RecursiveDirectoryIterator($inflector->
getSourceDir(), RecursiveDirectoryIterator::SKIP_DOTS
),
RecursiveIteratorIterator::LEAVES_ONLY
);
if (!
$total) { $total =
iterator_count($iterator);
} $count = 0;
$maxCount = 5000;
$startTime =
time();