---
sourceType: api-reference
sourceTypeMatchedRule: api-prefix
slug: MA/api/lfs/getSavedFileList
title: getSavedFileList
---
Lấy thông tin tất cả các local data file đã được lưu của mini app.

## Parameters

### Object _object_

| Property | Type     | Default | Required | Description                              | Minimum Version |
| -------- | -------- | ------- | -------- | ---------------------------------------- | --------------- |
| success  | function |         |          | Callback function khi gọi api thành công |                 |
| fail     | function |         |          | Callback function khi gọi api thất bại   |                 |

## Return Values

### Promise \

| Property | Type              | Description                  | Minimum Version |
| -------- |-------------------| ---------------------------- | --------------- |
| list     | Array \ | Danh sách file đã lưu cục bộ |

## Entities

### FileInfo

| Property   | Type   | Description                                          | Minimum Version |
| ---------- | ------ | ---------------------------------------------------- | --------------- |
| filePath   | string | Đường dẫn tới file trong folder cục bộ của mini app. |                 |
| size       | number | Kích thước file (byte size)                          |                 |
| createTime | number | Thời gian file được tạo                              |                 |
| type       | string | Type của file (Vd: image/jpeg, video/mp4)            |                 |

## Sample Code

```jsx
import { LFSStorage } from 'zmp-sdk/apis';

LFSStorage.getSavedFileList({
  success: (data) => {
    // xử lý khi gọi api thành công
    const { list } = data;
  },
  fail: (error) => {
    // xử lý khi gọi api thất bại
    console.log(error);
  },
});
```

// hoặc

```jsx
import { LFSStorage } from 'zmp-sdk/apis';

const getSavedFileList = async () => {
  try {
    const { list } = await LFSStorage.getSavedFileList({});
  } catch (error) {
    // xử lý khi gọi api thất bại
    console.log(error);
  }
};
```
