```graphql type Container { withDirectory(path: String!, directory: DirectoryID!): Container! withFile(path: String!, file: FileID!): Container! } ``` Use case: copying the contents of a directory/file into a container's rootfs, rather than mounting it. Some discussion in https://github.com/dagger/dagger/pull/3219#issuecomment-1267809318
Activity
[-]Container: add withDirectory[/-][+]Container: add `withDirectory`[/+]vito commentedon Oct 21, 2022
Now that
Container.withFSexists I don't think we need this, because you can just take the existing FS and replace it with a copied one:Erring on the side of closing this since we've used similar justification to turn down other duplicative APIs, e.g. here: #3179 (comment)
[-]Container: add `withDirectory`[/-][+]Container: add `withCopiedDirectory`[/+][-]Container: add `withCopiedDirectory`[/-][+]Container: add `withCopiedDirectory` and `withCopiedFile`[/+]vito commentedon Oct 26, 2022
Reopening as it's way more convenient to just have this directly in the API, since it'll propagate to all codegen'd SDKs.
[-]Container: add `withCopiedDirectory` and `withCopiedFile`[/-][+]Container: add `withDirectory` and `withFile`[/+]sipsma commentedon Dec 6, 2022
Done here #3827