Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

ContainerResource.WithContainerFilesCallback

Method
📦 Aspire.Hosting v17.0.0
type ContainerResource interface {
// ... omitted for brevity
WithContainerFilesCallback(
destinationPath string,
callback func(arg1 ContainerFileSystemCallbackContext, arg2 *CancellationToken) []ContainerFileSystemItem,
options ...*ContainerFilesOptions,
) ContainerResource
}

Signature

methodWithContainerFilesCallbackbuilder
Creates or updates files and/or folders at the destination path in the container using entries produced by a callback.
WithContainerFilesCallback(
destinationPath string,
callback func(arg1 ContainerFileSystemCallbackContext, arg2 *CancellationToken) []ContainerFileSystemItem,
options ...*ContainerFilesOptions,
) ContainerResource
destinationPathstringThe destination absolute path in the container.
callbackfunc(arg1 ContainerFileSystemCallbackContext, arg2 *CancellationToken) []ContainerFileSystemItemcallbackA callback that returns the file system entries to create or update. Use the factory methods on ContainerFileSystemCallbackContext (createFile, createDirectory, createCertificateFile) to build the entries.
options...*ContainerFilesOptionsOptional settings, described under Options.

Optional parameters are passed as the existing *ContainerFilesOptions struct.

ContainerResource

The resource builder.

Returns a handle; failures surface later via Err().

Defined on

This method is defined on the following type: