# 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

```
{
  "name": "1000000042.jpg",
  "path": "file:///data/user/0/com.firstproject/cache/1000000042.jpg",
  "absolutePath": "file://file:///data/user/0/com.firstproject/cache/1000000042.jpg",
  "size": 46806,
  "type": "file",
  "lastModified": 0,
  "mimeType": "image/jpeg",
  "aperture": null,
  "datetime": null,
  "exposureTime": null,
  "flash": null,
  "focalLength": null,
  "gpsAltitude": null,
  "gpsAltitudeRef": null,
  "gpsDateStamp": null,
  "gpsLatitude": null,
  "gpsLatitudeRef": null,
  "gpsLongitude": null,
  "gpsLongitudeRef": null,
  "gpsProcessingMethod": null,
  "iso": null,
  "make": null,
  "model": null,
  "orientation": "0",
  "whiteBalance": null
}
```

## Callback

### callback

The functions to be executed if the details of the file are retrieved successfully.&#x20;

| 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.&#x20;

| 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.

```js
Note: This example will only work after the user has created an image file in their device.
```

### Steps

1. Drag a button component to a page in the mobile designer, select the event `press` and drag the `File.getDetails` function to the event flow and fill in the `filepath` parameter.

   ![](/files/vzS3CMDqc2a2NThV3KQh)
2. On the `File.getDetails` function callback add a `Log.write` function and change it's value param type to input.

   ![](/files/eZHIdi0K3s25V9GSk9IL)

### Result

1. Open the installed app on a device with a debugger on and try to press the button.
2. If the file exists, user should be able to see the details on the console.

   ![](/files/0BzK7ClDe4iSmqsEScgg)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/react-native/file/getdetails.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
