Documentation
¶
Overview ¶
Package fs provides a virtual filesystem interface for SCALIBR scans and related helper functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FS ¶
FS is a filesystem interface that allows the opening of files, reading of directories, and performing stat on files.
FS implementations may return ErrNotImplemented for `Open`, `ReadDir` and `Stat`. Extractor implementations must decide whether the error is fatal or can be ignored.
FS implementations MUST implement io.ReaderAt for opened files to enable random access.
type ScanRoot ¶
type ScanRoot struct { // A virtual filesystem for file access, rooted at the scan root. FS FS // The path of the scan root. Empty if this is a virtual filesystem and the // scanning environment doesn't support the DirectFS requirement. Path string }
ScanRoot defines a root directory to start a scan from. mounted to a local dir.
func RealFSScanRoot ¶
RealFSScanRoot returns a ScanRoot array the given root path on the real filesystem SCALIBR is running on.
func RealFSScanRoots ¶
RealFSScanRoots returns a one-element ScanRoot array representing the given root path on the real filesystem SCALIBR is running on.
func (*ScanRoot) IsVirtual ¶
IsVirtual returns true if the scan root represents the root of a virtual filesystem, i.e. one with no real location on the disk of the scanned host.
func (*ScanRoot) WithAbsolutePath ¶
WithAbsolutePath returns a copy of the ScanRoot with the Path set an absolute path.