Skip to main content

Get resource path inside current script bundle (xpp.resource_path)

Declaration​

res_path = xpp.resource_path(filename)

Parameters​

  • filename
    String. The resource file name to look up.

Returns​

  • res_path
    String | nil. Path to the specified resource inside the current script bundle; nil if the resource does not exist.

Description​

Get the path of a resource file inside the currently running script bundle. Localization is supported.
See XPP spec: XPP

Example​

local path = xpp.resource_path('appicon.png')