Script's resource
Purpose¶
Access to a script’s resources.
A script may have one or more resources of varying types: HTML, XML, XSLT, TypeScript, etc.
Methods¶
Binding name: p6.resource
get¶
Get the named resource as a String.
Syntax
String p6.resource.get(String resourceName)
Example
p6.log.debug p6.resource.get('name')
list¶
New Feature
Since 6.10.18
Lists all the resources related to a script.
Syntax
List<String> p6.resource.list()
Example
p6.resource.list().each { resName ->
p6.log.debug "Resource: ${resName}"
}