Documentation
¶
Overview ¶
Package depfile provides a temporary abstraction for files that have been opened for extraction. TODO(michaelkedar): This is used for guided remediation, and will be removed after the migration to OSV-Scalibr is complete.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DepFile ¶
type DepFile interface {
io.Reader
// Open opens an NestedDepFile based on the path of the
// current DepFile if the provided path is relative.
//
// If the path is an absolute path, then it is opened absolutely.
Open(path string) (NestedDepFile, error)
Path() string
}
DepFile is an abstraction for a file that has been opened for extraction, and that knows how to open other DepFiles relative to itself.
type LocalFile ¶
type LocalFile struct {
// TODO(rexpan): This should be *os.File, as that would allow us to access other underlying functions that definitely will exist
io.ReadCloser
// contains filtered or unexported fields
}
A LocalFile represents a file that exists on the local filesystem.
type NestedDepFile ¶
NestedDepFile is an abstraction for a file that has been opened while extracting another file, and would need to be closed.
func OpenLocalDepFile ¶
func OpenLocalDepFile(path string) (NestedDepFile, error)
Click to show internal directories.
Click to hide internal directories.