Skip to content

Instantly share code, notes, and snippets.

@imagejan
Last active June 26, 2018 08:30
Show Gist options
  • Save imagejan/a98b22408f3ad5757fbc6d1b477f3242 to your computer and use it in GitHub Desktop.
Save imagejan/a98b22408f3ad5757fbc6d1b477f3242 to your computer and use it in GitHub Desktop.
How to filter the list of available modules and scripts by input type
#@ ModuleService ms
#@ ScriptService ss
ms.getModules().each { module ->
module.inputs().each { input ->
if (input.getType() == java.io.File) {
println "Module $module"
}
}
}
println ""
ss.getScripts().each { script ->
script.inputs().each { input ->
if (input.getType() == java.io.File) {
println "Script $script"
}
}
}
println ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment