remove
Last updated
Removes an existing file in the cache directory of the mobile phone.
fileName
The name of the file to be removed.
Text
-
-
Yes
folder
The folder path of the file. If this input is provided, it will be appended to the storage path.
Text
-
-
No
extra
The stored value that is passed to all the callbacks.
Any
-
-
No
Returns the formatted information.
Object
success
Boolean value to denote whether the function was executed successfully.
Text
message
The message to print.
Text
data
Any additional message or data to print.
Text
The action performed if this function runs successfully.
Returns an object that contains the file information.
Object
The action performed if this function does not run successfully.
Returns an error message.
Text
In this example, we will remove a file from the device.
Drag a button component to a page in the mobile designer.

Select the event press and drag the File.remove function to the event flow and fill in the parameter.

Open the installed app on a device and try to press the button.
The selected file should be deleted.

Last updated
Note: This example will only work after the user has created a file using `File.write` function.