Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var SkipDir = filepath.SkipDir
SkipDir is used as a return value from WalkFuncs to indicate that the directory named in the call is to be skipped. It is not returned as an error by any function.
var SkipZip = fmt.Errorf("SkipZip")
SkipZip allows you to skip going into the zip file
Functions ¶
func Stat ¶
Stat will get the status of files embedded in a zip path e.g., file1.zip/file2.zip/a.txt
func Walk ¶
Walk walks the file tree rooted at root including through zip files, calling walkFn for each file or directory in the tree, including root. All errors that arise visiting files and directories are filtered by walkFn. The real files are walked in lexical order, which makes the output deterministic but means that for very large directories Walk can be inefficient. Files insize zip files are walked in the order they appear in the zip file. Walk does not follow symbolic links.
Types ¶
type WalkFunc ¶
WalkFunc is the type of the function called for each file or directory visited by Walk. The path argument contains the argument to Walk as a prefix; that is, if Walk is called with "dir", which is a directory containing the file "a", the walk function will be called with argument "dir/a". The info argument is the os.FileInfo for the named path.
If there was a problem walking to the file or directory named by path, the incoming error will describe the problem and the function can decide how to handle that error (and Walk will not descend into that directory). If an error is returned, processing stops. The sole exception is when the function returns the special value SkipDir. If the function returns SkipDir when invoked on a directory, Walk skips the directory's contents entirely. If the function returns SkipDir when invoked on a non-directory file, Walk skips the remaining files in the containing directory.
type ZipFileInfo ¶
ZipFileInfo is used to "mask" the modified time of the files extracted from the zip
func NewZipFileInfo ¶
func NewZipFileInfo(lm time.Time, info os.FileInfo) ZipFileInfo
NewZipFileInfo creates an os.FileInfo from given last modified time and "parent" FileInfo
func (ZipFileInfo) ModTime ¶
func (zfi ZipFileInfo) ModTime() time.Time
ModTime returns the date of the full parent zip file's modification time