private function migrateFile($path, MediaServiceInterface
$fromFilesystem, MediaServiceInterface
$toFileSystem) { // only do migration if it's on the local filesystem since could take a long time
// to read and write all the files
if ($fromFilesystem->
getAdapterType() === 'local'
) { if (!
$fromFilesystem->
isEncoded($path)) { ++
$this->counter
['migrated'
];
$fromFilesystem->
migrateFile($path);
} } // file already exists
if ($toFileSystem->
has($path)) { ++
$this->counter
['skipped'
];
return;
} // move file to new filesystem and remove the old one