---
title: FileSystemDirectoryHandle.keys()
slug: Web/API/FileSystemDirectoryHandle/keys
tags:
  - Directories
  - File System Access API
  - FileSystemDirectoryHandle
  - Files
  - Iterable
  - Method
browser-compat: api.FileSystemDirectoryHandle.keys
---
{{draft}}{{securecontext_header}}{{DefaultAPISidebar("File System Access API")}}

The **`keys()`** method of the
{{domxref("FileSystemDirectoryHandle")}} interface returns a new _array iterator_
containing the keys for each item in `FileSystemDirectoryHandle`.

## Syntax

```js
FileSystemDirectoryHandle.keys();
```

### Parameters

None.

### Return value

A new {{jsxref('Array')}}

## Examples

Todo

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- [File System Access API](/en-US/docs/Web/API/File_System_Access_API)
- [The File System Access API:
  simplifying access to local files](https://web.dev/file-system-access/)
