fileutil

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressDir

func CompressDir(dir string) error

CompressDir compresses the directory into a zip file

func FileExists added in v0.5.0

func FileExists(filename string) bool

FileExists checks if the file exists in the provided path.

func Unzip added in v1.1.0

func Unzip(zipPath, destDir string) error

Unzip extracts zipPath into destDir, rejecting any entry whose path would escape destDir (Zip-Slip) since a transported archive is not fully trusted.

func ZipDir added in v1.1.0

func ZipDir(zipPath, srcDir string) error

ZipDir writes every file under srcDir into a new zip at zipPath, preserving the relative directory layout with forward-slash entry names. Unlike CompressDir it neither flattens names nor deletes the source — it is the producer side of cross-host archive transport.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL