Difference between revisions of "Application:getNativePath"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
m (Text replacement - "</source" to "</syntaxhighlight")
 
Line 7: Line 7:
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
(string) = application:getNativePath(path)
 
(string) = application:getNativePath(path)
</source>
+
</syntaxhighlight>
  
 
=== Parameters ===
 
=== Parameters ===
Line 19: Line 19:
 
local imgpath = application:getNativePath("gfx/myimage.png") -- image in /gfx project folder
 
local imgpath = application:getNativePath("gfx/myimage.png") -- image in /gfx project folder
 
print(imgpath) -- "C:/Users/xxx/AppData/Local/Temp/gideros/YYY/resource/gfx/myimage.png"
 
print(imgpath) -- "C:/Users/xxx/AppData/Local/Temp/gideros/YYY/resource/gfx/myimage.png"
</source>
+
</syntaxhighlight>
  
 
{{Application}}
 
{{Application}}

Latest revision as of 17:09, 12 July 2023

Available since: Gideros 2021.10
Class: Application

Description

Returns the system path for a given resource.

(string) = application:getNativePath(path)

Parameters

path: (string) path to an application local resource

Return values

Returns (string) the native path of the given resource

Example

local imgpath = application:getNativePath("gfx/myimage.png") -- image in /gfx project folder
print(imgpath) -- "C:/Users/xxx/AppData/Local/Temp/gideros/YYY/resource/gfx/myimage.png"