package copy
import "github.com/containers/storage/drivers/copy"
Index ¶
- func CopyRegular(srcPath, dstPath string, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error
- func CopyRegularToFile(srcPath string, dstFile *os.File, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error
- func DirCopy(srcDir, dstDir string, copyMode Mode, copyXattrs bool) error
- type Mode
Functions ¶
func CopyRegular ¶
func CopyRegular(srcPath, dstPath string, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error
CopyRegular copies the content of a file to another
func CopyRegularToFile ¶
func CopyRegularToFile(srcPath string, dstFile *os.File, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error
CopyRegularToFile copies the content of a file to another
func DirCopy ¶
DirCopy copies or hardlinks the contents of one directory to another, properly handling xattrs, and soft links
Copying xattrs can be opted out of by passing false for copyXattrs.
Types ¶
type Mode ¶
type Mode int
Mode indicates whether to use hardlink or copy content
const ( // Content creates a new file, and copies the content of the file Content Mode = iota // Hardlink creates a new hardlink to the existing file Hardlink )
Source Files ¶
- Version
- v1.58.0 (latest)
- Published
- Apr 15, 2025
- Platform
- linux/amd64
- Imports
- 15 packages
- Last checked
- 3 weeks ago –
Tools for package owners.