ContainerFileSystemCallbackContext.createFile

Method
📦 Aspire.Hosting v17.0.0
interface ContainerFileSystemCallbackContext {
// ... omitted for brevity
createFile(
name: string,
contents?: string,
sourcePath?: string,
owner?: number,
group?: number,
mode?: number,
continueOnError?: boolean): ContainerFileSystemItem;
}

Signature

methodcreateFile
Creates a container file entry with inline contents or a host source path.
createFile(
name: string,
contents?: string,
sourcePath?: string,
owner?: number,
group?: number,
mode?: number,
continueOnError?: boolean): ContainerFileSystemItem
namestringThe simple file name (no path separators).
contentsstringoptionalThe inline UTF-8 contents of the file. Mutually exclusive with `sourcePath`.
sourcePathstringoptionalAn absolute path to a file on the host to copy. Mutually exclusive with `contents`.
ownernumberoptionalThe owner UID, or `null` to inherit.
groupnumberoptionalThe group GID, or `null` to inherit.
modenumberoptionalThe Unix file mode as an integer (for example `0o644`), or `null` to inherit.
continueOnErrorbooleanoptionalWhether to ignore errors creating this file.
ContainerFileSystemItem

Defined on

This method is defined on the following type: