move method

Future<String> move(
  1. String distro,
  2. String newPath
)

Move WSL distro to another location by distro and newPath. Returns ProcessResult of the command.

Implementation

Future<String> move(String distro, String newPath) async {
  SafePath path = SafePath(newPath);
  await export(distro, path.file('export.ext4'));
  await remove(distro);
  var res = await import(distro, newPath, path.file('export.ext4'));
  await File(path.file('export.ext4')).delete();

  return res;
}