# FileSaverControls

How the file saver contract scripts a port. A real adapter implements these
by providing or hiding the browser's file and download support.

This is an interface exported by `@mapcairn/core/contracts`, checked against version 0.2.0.

## Signature

```ts
import type { FileSaverControls } from "@mapcairn/core/contracts";
 
interface FileSaverControls
```

## Methods

### saved

```ts
saved(): readonly SavedFile[];
```

The files that were saved, oldest first.

### willFail

```ts
willFail(reason: FileSaverContractFailure): void;
```

Makes every later save fail the way `reason` describes.

- `reason` (`FileSaverContractFailure`)

### willSucceed

```ts
willSucceed(): void;
```

Makes every later save succeed.

## See also

- [`SavedFile`](https://docs.mapcairn.com/api/core/SavedFile.md)
- [`FileSaverContractFailure`](https://docs.mapcairn.com/api/core/contracts/FileSaverContractFailure.md)

Source: [packages/core/src/contracts/fileSaver.contract.ts:16](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/contracts/fileSaver.contract.ts#L16)
