# List

Launch stage: GA

`GET /api/2.0/dbfs/list`

List the contents of a directory, or details of the file. If the file or directory does not exist, this call
 throws an exception with `RESOURCE_DOES_NOT_EXIST`.

 When calling list on a large directory, the list operation will time out after approximately 60 seconds.
 We strongly recommend using list only on directories containing less than 10K files and discourage using
 the DBFS REST API for operations that list more than 10K files. Instead, we recommend that you perform such
 operations in the context of a cluster, using
 the [File system utility (dbutils.fs)](https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-fs), which provides the same
 functionality without timing out.

API scopes: files

## Query parameters

- `path` (string, optional)
  The path of the file or directory. The path should be the absolute DBFS path.
  Example: `/mnt/foo`

## Returns

Returns a list of FileInfo objects.

## Response

```json
{
  "files": [
    {
      "path": "string",
      "is_dir": true,
      "file_size": 0,
      "modification_time": 0
    }
  ]
}
```

