Documentation
¶
Overview ¶
Package fsutil contains safe filesystem helpers used when writing archive entries to disk: escape-proof path resolution plus directory, file, symlink and hardlink replacement with metadata handling.
Index ¶
- func ApplyDirMetadata(dirs []DirMetadata) error
- func EnsureParentDir(targetPath string) error
- func ReplaceWithDir(targetPath string, mode os.FileMode) error
- func ReplaceWithFile(targetPath string, hdr *tar.Header, r io.Reader, buf []byte) error
- func ReplaceWithHardlink(root, targetPath string, hdr *tar.Header) error
- func ReplaceWithSymlink(targetPath string, hdr *tar.Header) error
- func ResolveSafePath(root, name string) (string, error)
- type DirMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyDirMetadata ¶
func ApplyDirMetadata(dirs []DirMetadata) error
func EnsureParentDir ¶
func ReplaceWithFile ¶
func ResolveSafePath ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.