isWithinOutputPath function Null safety
Ensure filePath is contained in the outputDir folder, to make sure archives aren't trying to write to some system path.
Implementation
bool isWithinOutputPath(String outputDir, String filePath) {
return p.isWithin(p.canonicalize(outputDir), p.canonicalize(filePath));
}