Documentation
¶
Overview ¶
Package scan provides a scanner for scanning archives into metadatas.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WalkDirIter ¶
func WalkDirIter(fsys fs.FS, root string) func(func(WalkDirEntry) bool)
WalkDirIter returns an iterator that can be used to iterate over the contents of a directory. It uses WalkDir under the hood. To skip a directory, call the SkipDir method on an entry.
Types ¶
type ScanResult ¶
type ScanResult struct {
Meta plugins.MetadataV1
Path string
}
type Scanner ¶
func NewScanner ¶
NewScanner creates a new scanner with the given plugins.
func (*Scanner) Scan ¶
func (s *Scanner) Scan() func(func(ScanResult) bool)
Scan scans the archive at the given path and returns the metadata.
type WalkDirEntry ¶
type WalkDirEntry struct {
Path string
Entry fs.DirEntry
Err error
// contains filtered or unexported fields
}
func (WalkDirEntry) SkipDir ¶
func (entry WalkDirEntry) SkipDir()
SkipDir causes the iteration to skip the contents of the entry. This will have no effect if called outside the iteration for this particular entry.
Click to show internal directories.
Click to hide internal directories.