CreateFile
Method
func (ContainerFileSystemCallbackContext) CreateFile( name string, options ...*CreateFileOptions,) ContainerFileSystemItemSignature
method
CreateFile Creates a container file entry with inline contents or a host source path.
CreateFile( name string, options ...*CreateFileOptions,) ContainerFileSystemItemParameters
namestringThe simple file name (no path separators).options...*CreateFileOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*CreateFileOptions argument.
Contents*stringThe inline UTF-8 contents of the file. Mutually exclusive with sourcePath .SourcePath *stringAn absolute path to a file on the host to copy. Mutually exclusive with contents.Owner*float64The owner UID, or null to inherit.Group*float64The group GID, or null to inherit.Mode*float64The Unix file mode as an integer (for example 0o644), or null to inherit.ContinueOnError *boolWhether to ignore errors creating this file.Returns
ContainerFileSystemItem The created file entry.
Returns a handle; failures surface later via Err().
Applies to
This method applies to the following types: