configure method
Composes Steps into one unit to enable more modular and understandable workflows.
Has to return a Step.
Implementation
@override
Step configure() {
return Runnable(name: name, (context) {
try {
final Directory workDirectory = Directory(binariesPath);
workDirectory.listSync().forEach((entity) {
if (entity is File)
_forFile(entity);
else if (entity is Directory)
_forDirectory(entity);
else
context.send(
Response(
"Only files and directories will be installed.",
Level.verbose,
),
);
});
return Response(
"Installation complete successfully.",
Level.verbose,
);
} catch (error) {
return Response(error.toString(), Level.verbose);
}
});
}