Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateOptions ¶
type CreateOptions struct { Root string // Path is relative to Root. Path string Mode fs.FileMode Data io.Reader // If Link is not empty and the symlink flag is set in Mode, a symlink is // created. If the symlink flag is not set in Mode, a hard link is created. Link string // If MakeParents is true, missing parent directories of Path are // created with permissions 0755. MakeParents bool // If OverrideMode is true and entry already exists, update the mode. Does // not affect symlinks. OverrideMode bool }
type Entry ¶ added in v0.9.1
func Create ¶
func Create(options *CreateOptions) (*Entry, error)
Create creates a filesystem entry according to the provided options and returns the information about the created entry.
Create can return errors from the os package.
func CreateWriter ¶ added in v1.0.0
func CreateWriter(options *CreateOptions) (io.WriteCloser, *Entry, error)
CreateWriter handles the creation of a regular file and collects the information recorded in Entry. The Hash and Size attributes are set on calling Close() on the Writer.
Click to show internal directories.
Click to hide internal directories.