installFromDirectoryFresh method
Implementation
Directory? installFromDirectoryFresh({
required Directory directoryPackage,
String? password,
bool deleteIfExist = true,
Directory? directoryOutPut,
String fileSystemEntityIgnore = "",
}) {
final res = archiveDirectory(
directoryPackage: directoryPackage,
password: password,
directoryOutPut: Directory(
path.join((directoryOutPut ?? Directory.current).path, "temp")),
fileSystemEntityIgnore: fileSystemEntityIgnore,
);
if (res == null) {
return null;
}
try {
final installed_dir = installFromArchive(
archivedFile: res,
password: password,
fileSystemEntityIgnore: fileSystemEntityIgnore,
deleteIfExist: deleteIfExist,
);
res.deleteSync(recursive: true);
return installed_dir;
} catch (e) {
res.deleteSync(recursive: true);
rethrow;
}
}