getDetails
Description
Gets the details of a file.
Input / Parameter
Name | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
filePath | The path the file is stored in. | Text | - | - | Yes |
Output
Description | Output Type |
---|---|
Returns file details or error message. | Any |
Object Return Format Example
Callback
callback
The functions to be executed if the details of the file are retrieved successfully.
Description | Output Type |
---|---|
Returns the details of the file. | Object |
errorCallback
The functions to be executed if the details of the file are not retrieved.
Description | Output Type |
---|---|
Returns an error message. | Text |
Example
In this example, we will get a file details of an image by using File.getDetails
function.
Steps
Drag a button component to a page in the mobile designer, select the event
press
and drag theFile.getDetails
function to the event flow and fill in thefilepath
parameter.On the
File.getDetails
function callback add aLog.write
function and change it's value param type to input.
Result
Open the installed app on a device with a debugger on and try to press the button.
If the file exists, user should be able to see the details on the console.
Last updated