# copy

Copy files between container and local filesystem.

```rhai
container.copy(source, dest) -> CommandResult
```

## Parameters

- `source` (string): Source path (container:path or local path)
- `dest` (string): Destination path (container:path or local path)

## Returns

Returns a `CommandResult` with the copy operation output.

## Examples

```rhai
let container = nerdctl_container_from_image("web", "nginx:latest")
    .build();

// Copy from host to container
let result1 = container.copy("./index.html", "web:/usr/share/nginx/html/");

// Copy from container to host
let result2 = container.copy("web:/etc/nginx/nginx.conf", "./nginx.conf");

print(result1.success);
```

## Notes

- Use "container_name:path" format for container paths
- Can copy files or directories
- Container can be running or stopped
