# API Reference

> API reference for @anymux/s3.

Source: https://anymux-docs.n.yatsyk.com/docs/s3/api

# API Reference

## `S3FileSystem`

Implements `IFileSystem` using Amazon S3 as the backing store.

### Constructor

```ts
new S3FileSystem(options: S3FileSystemOptions)
```

### Options

| Option        | Type      | Description                                    |
| ------------- | --------- | ---------------------------------------------- |
| `bucket`      | `string`  | S3 bucket name                                 |
| `region`      | `string`  | AWS region                                     |
| `prefix`      | `string?` | Key prefix for all operations                  |
| `credentials` | `object?` | AWS credentials (accessKeyId, secretAccessKey) |
| `endpoint`    | `string?` | Custom endpoint for S3-compatible services     |

### Methods

Implements all `IFileSystem` methods: `readFile`, `writeFile`, `readDir`, `stat`, `mkdir`, `rm`, `exists`.
