getStoragePath
Description
Retrieves the native storage path.
Input / Parameter
Name
Description
Input Type
Default
Options
Required
type
The storage path of directories.
Text
cache
cache, data, external, external data, external cache
Yes
Output
Description
Output Type
The storage path string.
String
Callback
N/A
Example
In this example, we will show on the console the file path of a user device cache storage.
Steps
Drag a button component to a page in the mobile designer, select the event
press
and drag theLog.write
function to the event flow and change thevalue
parameter type toinput
. drag theFile.getStoragePath
function to the subflow and fill in thetype
parameter withcache
value.
Result
Open the installed app on a device with a debugger on and try to press the button.
User should be able to see the
cache
file path on the console.
Last updated