# ContainerResource.withContainerFiles

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Defined on: [ContainerResource](/reference/api/typescript/aspire.hosting/containerresource.md)
- Version: `13.5.3`
- Kind: `method`

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;
}
```

## Signature

```typescript
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`

## Defined on

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