Even though you can typically use on-demand resources as if they exist in your app's bundle, they are not physically there. Use this convenience function or alternatively system.pathForFile() to retrieve the actual path. This may be necessary when, for example, an on-demand resource is a text file (not an image) and io.open() is required to open the file and read its contents (guide).
onDemandResources.path( filename )
String. The name of the file that was requested as part of an on-demand resources request.