# lv_file_explorer.h (/api/others/file_explorer/lv_file_explorer_h)



<RelatedHeaders name="lv_file_explorer_private.h" isPrivate="false" />

<ApiSummary functions="14" enums="2" variables="1" />

Functions [#functions]

<ApiTabs items="[&#x22;Setters (2)&#x22;,&#x22;Getters (9)&#x22;,&#x22;Other (3)&#x22;]">
  <ApiTab value="Setters (2)">
    <ApiMember kind="function" name="lv_file_explorer_set_quick_access_path" file="others/file_explorer/lv_file_explorer.h" line="68" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L68">
      lv_file_explorer_set_quick_access_path [#lv_file_explorer_set_quick_access_path]

      Set file\_explorer

      ```c title=" " lineNumbers=1
      void lv_file_explorer_set_quick_access_path(lv_obj_t *obj, lv_file_explorer_dir_t dir, const char *path)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                                     |
      | ------ | ------------------------------------------------ | ----------------------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a label object                       |
      | `dir`  | <ApiLink name="lv_file_explorer_dir_t" />        | the dir from 'lv\_file\_explorer\_dir\_t' enum. |
      | `path` | `const char *`                                   | path                                            |
    </ApiMember>

    <ApiMember kind="function" name="lv_file_explorer_set_sort" file="others/file_explorer/lv_file_explorer.h" line="76" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L76">
      lv_file_explorer_set_sort [#lv_file_explorer_set_sort]

      Set file\_explorer sort

      ```c title=" " lineNumbers=1
      void lv_file_explorer_set_sort(lv_obj_t *obj, lv_file_explorer_sort_t sort)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                                       |
      | ------ | ------------------------------------------------ | ------------------------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a file explorer object                 |
      | `sort` | <ApiLink name="lv_file_explorer_sort_t" />       | the sort from 'lv\_file\_explorer\_sort\_t' enum. |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Getters (9)">
    <ApiMember kind="function" name="lv_file_explorer_get_selected_file_name" file="others/file_explorer/lv_file_explorer.h" line="94" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L94">
      lv_file_explorer_get_selected_file_name [#lv_file_explorer_get_selected_file_name]

      Get file explorer Selected file

      ```c title=" " lineNumbers=1
      const char * lv_file_explorer_get_selected_file_name(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description                       |
      | ----- | ------------------------------------------------------ | --------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to a file explorer object |

      **Returns:** `const char *` — pointer to the file explorer selected file name
    </ApiMember>

    <ApiMember kind="function" name="lv_file_explorer_get_current_path" file="others/file_explorer/lv_file_explorer.h" line="101" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L101">
      lv_file_explorer_get_current_path [#lv_file_explorer_get_current_path]

      Get file explorer cur path

      ```c title=" " lineNumbers=1
      const char * lv_file_explorer_get_current_path(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description                       |
      | ----- | ------------------------------------------------------ | --------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to a file explorer object |

      **Returns:** `const char *` — pointer to the file explorer cur path
    </ApiMember>

    <ApiMember kind="function" name="lv_file_explorer_get_file_table" file="others/file_explorer/lv_file_explorer.h" line="108" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L108">
      lv_file_explorer_get_file_table [#lv_file_explorer_get_file_table]

      Get file explorer file list obj(lv\_table)

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_file_explorer_get_file_table(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                       |
      | ----- | ------------------------------------------------ | --------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a file explorer object |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the file explorer file table obj(lv\_table)
    </ApiMember>

    <ApiMember kind="function" name="lv_file_explorer_get_header" file="others/file_explorer/lv_file_explorer.h" line="115" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L115">
      lv_file_explorer_get_header [#lv_file_explorer_get_header]

      Get file explorer head area obj

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_file_explorer_get_header(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                       |
      | ----- | ------------------------------------------------ | --------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a file explorer object |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the file explorer head area obj(lv\_obj)
    </ApiMember>

    <ApiMember kind="function" name="lv_file_explorer_get_path_label" file="others/file_explorer/lv_file_explorer.h" line="122" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L122">
      lv_file_explorer_get_path_label [#lv_file_explorer_get_path_label]

      Get file explorer path obj(label)

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_file_explorer_get_path_label(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                       |
      | ----- | ------------------------------------------------ | --------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a file explorer object |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the file explorer path obj(lv\_label)
    </ApiMember>

    <ApiMember kind="function" name="lv_file_explorer_get_quick_access_area" file="others/file_explorer/lv_file_explorer.h" line="130" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L130">
      lv_file_explorer_get_quick_access_area [#lv_file_explorer_get_quick_access_area]

      Get file explorer head area obj

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_file_explorer_get_quick_access_area(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                       |
      | ----- | ------------------------------------------------ | --------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a file explorer object |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the file explorer quick access area obj(lv\_obj)
    </ApiMember>

    <ApiMember kind="function" name="lv_file_explorer_get_places_list" file="others/file_explorer/lv_file_explorer.h" line="137" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L137">
      lv_file_explorer_get_places_list [#lv_file_explorer_get_places_list]

      Get file explorer places list obj(lv\_list)

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_file_explorer_get_places_list(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                       |
      | ----- | ------------------------------------------------ | --------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a file explorer object |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the file explorer places list obj(lv\_list)
    </ApiMember>

    <ApiMember kind="function" name="lv_file_explorer_get_device_list" file="others/file_explorer/lv_file_explorer.h" line="144" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L144">
      lv_file_explorer_get_device_list [#lv_file_explorer_get_device_list]

      Get file explorer device list obj(lv\_list)

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_file_explorer_get_device_list(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                       |
      | ----- | ------------------------------------------------ | --------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a file explorer object |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the file explorer device list obj(lv\_list)
    </ApiMember>

    <ApiMember kind="function" name="lv_file_explorer_get_sort" file="others/file_explorer/lv_file_explorer.h" line="152" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L152">
      lv_file_explorer_get_sort [#lv_file_explorer_get_sort]

      Set file\_explorer sort

      ```c title=" " lineNumbers=1
      lv_file_explorer_sort_t lv_file_explorer_get_sort(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description                       |
      | ----- | ------------------------------------------------------ | --------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to a file explorer object |

      **Returns:** <ApiLink name="lv_file_explorer_sort_t" /> — the current mode from 'lv\_file\_explorer\_sort\_t'
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (3)">
    <ApiMember kind="function" name="lv_file_explorer_create" file="others/file_explorer/lv_file_explorer.h" line="54" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L54">
      lv_file_explorer_create [#lv_file_explorer_create]

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_file_explorer_create(lv_obj_t *parent)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                             |
      | -------- | ------------------------------------------------ |
      | `parent` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> |
    </ApiMember>

    <ApiMember kind="function" name="lv_file_explorer_show_back_button" file="others/file_explorer/lv_file_explorer.h" line="83" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L83">
      lv_file_explorer_show_back_button [#lv_file_explorer_show_back_button]

      Set the visibility of the "\< Back" button

      ```c title=" " lineNumbers=1
      void lv_file_explorer_show_back_button(lv_obj_t *obj, bool show)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                               |
      | ------ | ------------------------------------------------ | ----------------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a file explorer object         |
      | `show` | <ApiLink name="bool" />                          | bool true/false, enable or disable button |
    </ApiMember>

    <ApiMember kind="function" name="lv_file_explorer_open_dir" file="others/file_explorer/lv_file_explorer.h" line="163" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L163">
      lv_file_explorer_open_dir [#lv_file_explorer_open_dir]

      Open a specified path

      ```c title=" " lineNumbers=1
      void lv_file_explorer_open_dir(lv_obj_t *obj, const char *dir)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                       |
      | ----- | ------------------------------------------------ | --------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a file explorer object |
      | `dir` | `const char *`                                   | pointer to the path               |
    </ApiMember>
  </ApiTab>
</ApiTabs>

Enums [#enums]

<ApiMember kind="enum" name="lv_file_explorer_sort_t" file="others/file_explorer/lv_file_explorer.h" line="29" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L29">
  lv_file_explorer_sort_t [#lv_file_explorer_sort_t]

  | Name                    |
  | ----------------------- |
  | `LV_EXPLORER_SORT_NONE` |
  | `LV_EXPLORER_SORT_KIND` |
</ApiMember>

<TypeUsedBy name="lv_file_explorer_sort_t" count="1">
  * `lv_file_explorer_set_sort` — param `sort`
</TypeUsedBy>

<ApiMember kind="enum" name="lv_file_explorer_dir_t" file="others/file_explorer/lv_file_explorer.h" line="35" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L35">
  lv_file_explorer_dir_t [#lv_file_explorer_dir_t]

  | Name                       |
  | -------------------------- |
  | `LV_EXPLORER_HOME_DIR`     |
  | `LV_EXPLORER_MUSIC_DIR`    |
  | `LV_EXPLORER_PICTURES_DIR` |
  | `LV_EXPLORER_VIDEO_DIR`    |
  | `LV_EXPLORER_DOCS_DIR`     |
  | `LV_EXPLORER_FS_DIR`       |
</ApiMember>

<TypeUsedBy name="lv_file_explorer_dir_t" count="1">
  * `lv_file_explorer_set_quick_access_path` — param `dir`
</TypeUsedBy>

Variables [#variables]

<ApiMember kind="variable" name="lv_file_explorer_class" file="others/file_explorer/lv_file_explorer.h" line="45" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/others/file_explorer/lv_file_explorer.h#L45">
  lv_file_explorer_class [#lv_file_explorer_class]

  ```c title=" " lineNumbers=1
  const lv_obj_class_t lv_file_explorer_class
  ```
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_obj.h&#x22;]" includedBy="[&#x22;lv_file_explorer_private.h&#x22;]" transitiveIncludes="[&#x22;lv_anim.h&#x22;, &#x22;lv_area.h&#x22;, &#x22;lv_array.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_bidi.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_kconfig.h&#x22;, &#x22;lv_display.h&#x22;, &#x22;lv_draw.h&#x22;, &#x22;lv_draw_arc.h&#x22;, &#x22;lv_draw_blur.h&#x22;, &#x22;lv_draw_buf.h&#x22;, &#x22;lv_draw_image.h&#x22;, &#x22;lv_draw_label.h&#x22;, &#x22;lv_draw_line.h&#x22;, &#x22;lv_draw_rect.h&#x22;, &#x22;lv_draw_triangle.h&#x22;, &#x22;lv_event.h&#x22;, &#x22;lv_ext_data.h&#x22;, &#x22;lv_flex.h&#x22;, &#x22;lv_font.h&#x22;, &#x22;lv_fs.h&#x22;, &#x22;lv_grad.h&#x22;, &#x22;lv_grid.h&#x22;, &#x22;lv_group.h&#x22;, &#x22;lv_image_decoder.h&#x22;, &#x22;lv_image_dsc.h&#x22;, &#x22;lv_indev.h&#x22;, &#x22;lv_layout.h&#x22;, &#x22;lv_ll.h&#x22;, &#x22;lv_log.h&#x22;, &#x22;lv_math.h&#x22;, &#x22;lv_matrix.h&#x22;, &#x22;lv_mem.h&#x22;, &#x22;lv_obj_class.h&#x22;, &#x22;lv_obj_draw.h&#x22;, &#x22;lv_obj_event.h&#x22;, &#x22;lv_obj_pos.h&#x22;, &#x22;lv_obj_property.h&#x22;, &#x22;lv_obj_property_names.h&#x22;, &#x22;lv_obj_scroll.h&#x22;, &#x22;lv_obj_style.h&#x22;, &#x22;lv_obj_style_gen.h&#x22;, &#x22;lv_obj_tree.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_profiler.h&#x22;, &#x22;lv_profiler_builtin.h&#x22;, &#x22;lv_sprintf.h&#x22;, &#x22;lv_string.h&#x22;, &#x22;lv_style.h&#x22;, &#x22;lv_style_gen.h&#x22;, &#x22;lv_style_properties.h&#x22;, &#x22;lv_symbol_def.h&#x22;, &#x22;lv_text.h&#x22;, &#x22;lv_tick.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
