Versions in this module Expand all Collapse all v1 v1.0.0 Mar 1, 2024 Changes in this version + var ErrSkipPath = errors.New("skip path") + func NewExcludingDecorator(delegate file.Resolver, excludeFn excludeFn) file.Resolver + func NewFromRootedUnindexedDirectory(dir string, base string) file.WritableResolver + func NewFromUnindexedDirectory(dir string) file.WritableResolver + func NewFromUnindexedDirectoryFS(fs afero.Fs, dir string, base string) file.WritableResolver + func NormalizeBaseDirectory(base string) (string, error) + func NormalizeRootDirectory(root string) (string, error) + type ChrootContext struct + func NewChrootContext(root, base, cwd string) (*ChrootContext, error) + func NewChrootContextFromCWD(root, base string) (*ChrootContext, error) + func (r *ChrootContext) ChangeDirectory(dir string) error + func (r *ChrootContext) ChangeRoot(dir string) error + func (r ChrootContext) Base() string + func (r ChrootContext) Root() string + func (r ChrootContext) ToChrootPath(nativePath string) string + func (r ChrootContext) ToNativePath(chrootPath string) (string, error) + type ContainerImageAllLayers struct + func NewFromContainerImageAllLayers(img *image.Image) (*ContainerImageAllLayers, error) + func (r *ContainerImageAllLayers) AllLocations(ctx context.Context) <-chan file.Location + func (r *ContainerImageAllLayers) FileContentsByLocation(location file.Location) (io.ReadCloser, error) + func (r *ContainerImageAllLayers) FileMetadataByLocation(location file.Location) (file.Metadata, error) + func (r *ContainerImageAllLayers) FilesByGlob(patterns ...string) ([]file.Location, error) + func (r *ContainerImageAllLayers) FilesByMIMEType(types ...string) ([]file.Location, error) + func (r *ContainerImageAllLayers) FilesByPath(paths ...string) ([]file.Location, error) + func (r *ContainerImageAllLayers) HasPath(path string) bool + func (r *ContainerImageAllLayers) RelativeFileByPath(location file.Location, path string) *file.Location + type ContainerImageSquash struct + func NewFromContainerImageSquash(img *image.Image) (*ContainerImageSquash, error) + func (r *ContainerImageSquash) AllLocations(ctx context.Context) <-chan file.Location + func (r *ContainerImageSquash) FileContentsByLocation(location file.Location) (io.ReadCloser, error) + func (r *ContainerImageSquash) FileMetadataByLocation(location file.Location) (file.Metadata, error) + func (r *ContainerImageSquash) FilesByGlob(patterns ...string) ([]file.Location, error) + func (r *ContainerImageSquash) FilesByMIMEType(types ...string) ([]file.Location, error) + func (r *ContainerImageSquash) FilesByPath(paths ...string) ([]file.Location, error) + func (r *ContainerImageSquash) HasPath(path string) bool + func (r *ContainerImageSquash) RelativeFileByPath(_ file.Location, path string) *file.Location + type Deferred struct + func NewDeferred(creator func() (file.Resolver, error)) *Deferred + func (d *Deferred) AllLocations(ctx context.Context) <-chan file.Location + func (d *Deferred) FileContentsByLocation(location file.Location) (io.ReadCloser, error) + func (d *Deferred) FileMetadataByLocation(location file.Location) (file.Metadata, error) + func (d *Deferred) FilesByGlob(patterns ...string) ([]file.Location, error) + func (d *Deferred) FilesByMIMEType(types ...string) ([]file.Location, error) + func (d *Deferred) FilesByPath(paths ...string) ([]file.Location, error) + func (d *Deferred) HasPath(s string) bool + func (d *Deferred) RelativeFileByPath(location file.Location, path string) *file.Location + type Directory struct + func NewFromDirectory(root string, base string, pathFilters ...PathIndexVisitor) (*Directory, error) + func (r *Directory) AllLocations(ctx context.Context) <-chan file.Location + func (r *Directory) FileMetadataByLocation(location file.Location) (file.Metadata, error) + func (r *Directory) FilesByMIMEType(types ...string) ([]file.Location, error) + func (r *Directory) HasPath(userPath string) bool + func (r *Directory) RelativeFileByPath(_ file.Location, path string) *file.Location + func (r Directory) FileContentsByLocation(location file.Location) (io.ReadCloser, error) + func (r Directory) FilesByGlob(patterns ...string) ([]file.Location, error) + func (r Directory) FilesByPath(userPaths ...string) ([]file.Location, error) + func (r Directory) String() string + type Empty struct + func (e Empty) AllLocations(_ context.Context) <-chan file.Location + func (e Empty) FileContentsByLocation(_ file.Location) (io.ReadCloser, error) + func (e Empty) FileMetadataByLocation(_ file.Location) (file.Metadata, error) + func (e Empty) FilesByGlob(_ ...string) ([]file.Location, error) + func (e Empty) FilesByMIMEType(_ ...string) ([]file.Location, error) + func (e Empty) FilesByPath(_ ...string) ([]file.Location, error) + func (e Empty) HasPath(_ string) bool + func (e Empty) RelativeFileByPath(_ file.Location, _ string) *file.Location + func (e Empty) Write(_ file.Location, _ io.Reader) error + type PathIndexVisitor func(string, string, os.FileInfo, error) error + type UnindexedDirectory struct + func (u UnindexedDirectory) AllLocations(ctx context.Context) <-chan file.Location + func (u UnindexedDirectory) FileContentsByLocation(location file.Location) (io.ReadCloser, error) + func (u UnindexedDirectory) FileMetadataByLocation(_ file.Location) (file.Metadata, error) + func (u UnindexedDirectory) FilesByGlob(patterns ...string) (out []file.Location, _ error) + func (u UnindexedDirectory) FilesByMIMEType(_ ...string) ([]file.Location, error) + func (u UnindexedDirectory) FilesByPath(paths ...string) (out []file.Location, _ error) + func (u UnindexedDirectory) HasPath(p string) bool + func (u UnindexedDirectory) RelativeFileByPath(l file.Location, p string) *file.Location + func (u UnindexedDirectory) Write(location file.Location, reader io.Reader) error