Lists all zip files containing any yaml file; also lists all invalid zip files and non-zip files in a directory tree
Copy this code and paste it in your HTML
for (entries
= zf.
entries(); entries.
hasMoreElements();) { zipEntryName = entries.nextElement().getName()
if (zipEntryName
==~ /.
*yaml$/
|| zipEntryName
==~ /.
*yml$/
) println file.
toString() + ": " + zipEntryName
}
println "ERROR: " + file.
toString() + " is problematic zip!" }
}
if (f.
toString() ==~ /.
*zip$/
) { processZip(f)
}
println "ERROR: " + f.
toString() + " is not a zip file" }
Report this snippet
Comments
Subscribe to comments