onDemandResources.path()

Type Function
Return value String
Revision Release 2024.3703
Keywords on-demand resources, onDemandResources, path
See also system.pathForFile()
onDemandResources.*

Overview

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).

Syntax

onDemandResources.path( filename )
filename (required)

String. The name of the file that was requested as part of an on-demand resources request.