function sendFileLocal($localFile, $uri, $instanceOpt) { $remotefile = Migration::solveURI($uri, $instanceOpt['path']); if (!empty($remotefile)) { Migration::createFoldersFor($remotefile); App::import('Lib', 'Migration.MigrationConfig'); $dry = MigrationConfig::load('dryRun'); if ($dry) { Migration::msg('Attempt copy file ' . $localFile . ' to ' . $remotefile); return true; } else { return copy($localFile, $remotefile); } } return false; }