Discover Packages
github.com/12vault/ravel
internal
scan
package
Version:
v0.2.8
Opens a new window with list of versions in this module.
Published: Jul 18, 2026
License: MIT
Opens a new window with license information.
Imports: 16
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func LanguageForPath(path string) string
type File
type Ignored
type Options
type Result
func Scan(root string, cfg config.Config) (Result, error)
func ScanWithOptions(root string, cfg config.Config, visit func(path string, files int), ...) (Result, error)
func ScanWithProgress(root string, cfg config.Config, visit func(path string, files int)) (Result, error)
type File struct {
Path string `json:"path"`
AbsPath string `json:"-"`
Language string `json:"language"`
Size int64 `json:"size"`
Hash string `json:"hash"`
ModTime time .Time `json:"modifiedAt"`
}
type Ignored struct {
Path string `json:"path"`
Reason string `json:"reason"`
}
type Options struct {
HashCachePath string
ForceHashing bool
}
type Result struct {
Root string `json:"root"`
Files []File `json:"files"`
Ignored []Ignored `json:"ignored"`
TotalBytes int64 `json:"totalBytes"`
}
ScanWithOptions scans root with optional, reconstructible file-hash caching.
Callers that require a fresh content audit should use Scan or ScanWithProgress.
ScanWithProgress scans root and reports each filesystem entry before it is
inspected. The callback is optional and is intended for live CLI feedback.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.