Documentation
¶
Index ¶
- func AddZipFiles(w *zip.Writer, basePath, baseInZip string) error
- func ContainedSymlink(root, name string) (string, error)
- func ContextReader(ctx context.Context, r io.Reader) io.Reader
- func CreateZip(baseFolder, zipFile string) error
- func Unzip(r *zip.Reader, dest string) error
- func WriteTarGz(ctx context.Context, w io.Writer, dir string, exclude func(string) bool) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddZipFiles ¶
AddZipFiles recursively adds files from a directory to a zip archive.
func ContainedSymlink ¶
ContainedSymlink rejects absolute, broken, and escaping links. Checking the resolved target also catches escapes through intermediate directory symlinks.
func ContextReader ¶
ContextReader makes copying large files interruptible between reads.
func WriteTarGz ¶
func WriteTarGz(ctx context.Context, w io.Writer, dir string, exclude func(string) bool) (err error)
WriteTarGz writes the contents of dir without an enclosing directory. It preserves permissions and relative symlinks, but never follows symlinks. exclude receives slash-separated paths relative to dir.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.