# withContainerFiles

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Version: `13.5.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/e076d8e427cb3afb528dbd605acd74c3aea69f94)

Creates or updates files and folders in a container by copying them from a source path on the host.

## Definition

```typescript
interface ContainerResource {
  // ... omitted for brevity
  withContainerFiles(
    destinationPath: string,
    sourcePath: string,
    options?: ContainerFilesOptions): ContainerResource
}
```

## Parameters

- `destinationPath` (`string`)
- `sourcePath` (`string`)
- `options` ([ContainerFilesOptions](/reference/api/typescript/aspire.hosting/containerfilesoptions.md)) `optional`

## Returns

[ContainerResource](/reference/api/typescript/aspire.hosting/containerresource.md) `builder`

## Applies to

- [ContainerResource](/reference/api/typescript/aspire.hosting/containerresource.md)
