copyAllFilesSync method
Copy all files in the directory to the newPath
.
Implementation
void copyAllFilesSync(String newPath) {
Directory(newPath).createSync(recursive: true);
final e = listSync(recursive: true);
for (final dir in e.whereType<Directory>()) dir.createSync(recursive: true);
for (final file in e.whereType<File>()) {
file.copySync(join(newPath, relative(file.path, from: path)));
}
}