# `Magpie.Files.ListFolder`
[🔗](https://github.com/alexcassol/magpie/blob/v0.3.1/lib/magpie/files/list_folder.ex#L1)

Folder listing and change-cursor endpoints (`/files/list_folder*`).

# `get_latest_cursor`

```elixir
@spec get_latest_cursor(Magpie.Client.t(), binary()) :: Magpie.response()
```

A way to quickly get a cursor for the folder's state.

##Example

   Magpie.Files.ListFolder.get_latest_cursor client, ""

More info at: https://www.dropbox.com/developers/documentation/http/documentation#files-list_revisions

# `list_folder`

```elixir
@spec list_folder(Magpie.Client.t(), binary(), map()) :: Magpie.response()
```

Starts returning the contents of a folder. `opts` accepts the other
`/files/list_folder` argument fields, e.g. `"recursive"`, `"limit"`,
`"include_deleted"` and `"include_restorable_info"`.

##Example

   Magpie.Files.ListFolder.list_folder client, "/path"

More info at: https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder

# `list_folder_continue`

```elixir
@spec list_folder_continue(Magpie.Client.t(), binary()) :: Magpie.response()
```

Once a cursor has been retrieved from list_folder,
use this to paginate through all files and retrieve updates to the folder,
following the same rules as documented for list_folder.

##Example

   Magpie.Files.ListFolder.list_folder_continue client, ""

More info at: https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue

# `list_revisions`

```elixir
@spec list_revisions(Magpie.Client.t(), binary(), number(), map()) ::
  Magpie.response()
```

Return revisions of a file. `opts` accepts the other `/files/list_revisions`
argument fields, e.g. `"mode"`, `"before_rev"` and `"include_restorable_info"`.

##Example

   Magpie.Files.ListFolder.list_revisions client, ""

More info at: https://www.dropbox.com/developers/documentation/http/documentation#files-list_revisions

# `longpoll`

```elixir
@spec longpoll(Magpie.Client.t(), binary()) :: Magpie.response()
```

A longpoll endpoint to wait for changes on an account.

##Example

   Magpie.Files.ListFolder.longpoll client, ""

More info at: https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-longpoll

# `stream`

Returns a lazy `Stream` over **all** entries of a folder, fetching pages
through `list_folder/2` + `list_folder_continue/2` on demand — no cursor
handling needed. Raises `Magpie.Error` if a page request fails.

## Example

    client
    |> Magpie.Files.ListFolder.stream("/Photos")
    |> Stream.filter(&(&1[".tag"] == "file"))
    |> Enum.map(& &1["name"])

---

*Consult [api-reference.md](api-reference.md) for complete listing*
