copyVirtualToVirtual static method
Implementation
static File copyVirtualToVirtual({
required String filePathIn,
required String dirPathOut,
required Virtual fsIn,
required Virtual fsOut,
}) {
final file = fsIn.open(filePathIn)! as VFile;
final dir = fsOut.open(dirPathOut)! as VDir;
if (dir.children[file.name] == null) {
dir.children[file.name] = VFile.clone(file);
} else {
throw "[Virtual FileSystem]: file or dir with also name exists!";
}
return File(join(dirPathOut, file.name));
}