copy method
Copy a WSL distro by name
Implementation
Future<String> copy(String distribution, String newName) async {
String exportPath =
getInstancePath(distribution).file('$distribution.ext4');
// Copy
String exportRes = await export(distribution, exportPath);
String importRes =
await import(newName, getInstancePath(newName).path, exportPath);
// Cleanup, delete file
File file = File(exportPath);
if (file.existsSync()) {
file.deleteSync();
}
return '$exportRes $importRes';
}