# 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

1. Drag a button component to a page in the mobile designer, select the event `press` and drag the `Log.write` function to the event flow and change the `value` parameter type to `input`. drag the `File.getStoragePath` function to the subflow and fill in the `type` parameter with `cache` value.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-77718c84724efcb77cc63aaea1345c345fa8bb35%2FgetStoragePath-step-1.png?alt=media)

### Result

1. Open the installed app on a device with a debugger on and try to press the button.
2. User should be able to see the `cache` file path on the console.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-745044060c1c951657a41789ec78b3edb3d1f819%2FgetStoragePath-result-1.png?alt=media)
