# FileList

A list associated with a file query.

### Constructor

```ts
new FileList(book, payload): FileList;
```

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `book` | [`Book`](https://bkper.com/docs/api/bkper-js/classes/book.md) |
| `payload` | `FileList` |

#### Returns

`FileList`

### getCursor()

```ts
getCursor(): string | undefined;
```

Gets the cursor associated with the query for pagination.

#### Returns

`string` \| `undefined`

The cursor associated with the query for pagination

***

### getFirst()

```ts
getFirst(): File | undefined;
```

Gets the first File in the list.

#### Returns

[`File`](https://bkper.com/docs/api/bkper-js/classes/file.md) \| `undefined`

The first File in the list

***

### getItems()

```ts
getItems(): File[];
```

Gets the files in the list.

#### Returns

[`File`](https://bkper.com/docs/api/bkper-js/classes/file.md)[]

An array of File objects

***

### size()

```ts
size(): number;
```

Gets the total number of files in the list.

#### Returns

`number`

The total number of files
