# FoldersManager
Reach these methods through the `folders` field on `client::Client`.
## get
`GET /folders/{folder_id}`
| `folder_id` | path | `String` | yes |
| `fields` | query | `Vec<String>` | no |
| `if-none-match` | header | `String` | no |
| `boxapi` | header | `String` | no |
| `sort` | query | `GetIdSort` | no |
| `direction` | query | `OrderDirection` | no |
| `offset` | query | `i64` | no |
| `limit` | query | `i64` | no |
**Returns:** `FolderFull`
**Example**
```rust
let result = client.folders.get("FOLDER_ID".to_string(), None).await?;
```
## update
`PUT /folders/{folder_id}`
| `folder_id` | path | `String` | yes |
| `fields` | query | `Vec<String>` | no |
| `if-match` | header | `String` | no |
**Request body** (`application/json`): `FolderUpdateRequest`
**Returns:** `FolderFull`
**Example**
```rust
let result = client.folders.update("FOLDER_ID".to_string(), schemas::FolderUpdateRequest { /* … */ }, None).await?;
```
## delete
`DELETE /folders/{folder_id}`
| `folder_id` | path | `String` | yes |
| `if-match` | header | `String` | no |
| `recursive` | query | `bool` | no |
**Returns:** no content
**Example**
```rust
client.folders.delete("FOLDER_ID".to_string(), None).await?;
```
## list_items
`GET /folders/{folder_id}/items`
| `folder_id` | path | `String` | yes |
| `fields` | query | `Vec<String>` | no |
| `usemarker` | query | `bool` | no |
| `marker` | query | `String` | no |
| `offset` | query | `i64` | no |
| `limit` | query | `i64` | no |
| `boxapi` | header | `String` | no |
| `sort` | query | `GetIdSort` | no |
| `direction` | query | `OrderDirection` | no |
**Returns:** `Items`
**Example**
```rust
let mut pages = client.folders.list_items("FOLDER_ID".to_string(), None);
while let Some(item) = pages.next().await {
// use item
}
```
Paginated — `list_items(...)` returns a paginator you drive with `.next().await`, threading the cursor for you. See the [pagination guide](../pagination.md).
## create
`POST /folders`
| `fields` | query | `Vec<String>` | no |
**Request body** (`application/json`): `FolderCreateRequest`
**Returns:** `FolderFull`
**Example**
```rust
let result = client.folders.create(schemas::FolderCreateRequest { /* … */ }, None).await?;
```
## copy
`POST /folders/{folder_id}/copy`
| `folder_id` | path | `String` | yes |
| `fields` | query | `Vec<String>` | no |
**Request body** (`application/json`): `FolderCopyRequest`
**Returns:** `FolderFull`
**Example**
```rust
let result = client.folders.copy("FOLDER_ID".to_string(), schemas::FolderCopyRequest { /* … */ }, None).await?;
```