sourcefs

package
v0.19.1295 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry added in v0.19.1289

type Entry struct {
	os.FileInfo
	Target string
}

Entry is a directory entry as stored. Target is a symlink's text.

type FS

type FS struct {
	// contains filtered or unexported fields
}

func From

func From(fs afero.Fs, root string) (*FS, error)

From borrows an already-rooted filesystem. The root label is used only to interpret absolute input names; all filesystem operations remain relative.

func New

func New(fs afero.Fs, root string) (*FS, error)

New pins an OS source root or scopes an in-memory filesystem. Other backends must already be confined and explicitly borrowed with From.

func (*FS) Close

func (f *FS) Close() error

func (*FS) Entries added in v0.19.1289

func (f *FS) Entries(name string) ([]Entry, error)

Entries lists a directory like ReadDir, with the symlink exception of Entry.

func (*FS) Entry added in v0.19.1289

func (f *FS) Entry(name string) (Entry, error)

Entry is Lstat plus Readlink of name. Unlike Lstat, it accepts a symlink whose target resolves into Git metadata: Git tracks such a link as its text, and reading that text never follows the link.

func (*FS) Glob

func (f *FS) Glob(pattern string) ([]string, error)

func (*FS) Lstat

func (f *FS) Lstat(name string) (os.FileInfo, error)

func (*FS) Open

func (f *FS) Open(name string) (afero.File, error)

func (*FS) ReadDir

func (f *FS) ReadDir(name string) ([]os.FileInfo, error)

func (*FS) ReadFile

func (f *FS) ReadFile(name string) ([]byte, error)
func (f *FS) Readlink(name string) (string, error)

func (*FS) Reads added in v0.19.1289

func (f *FS) Reads() Reads

func (*FS) Record added in v0.19.1289

func (f *FS) Record()

Record starts collecting the paths this filesystem and its views touch.

func (*FS) Relative

func (f *FS) Relative(name string) (string, error)

func (*FS) Resolve

func (f *FS) Resolve(name string) (string, error)
func (f *FS) ResolveWithLinks(name string) (string, []Link, error)

func (*FS) Root

func (f *FS) Root() string

func (*FS) Sub

func (f *FS) Sub(name string) (*FS, error)

func (*FS) Walk

func (f *FS) Walk(name string, fn filepath.WalkFunc) error
type Link struct {
	Path, Target string
	Absolute     bool
}

type Reads added in v0.19.1289

type Reads struct {
	Read, Stat []string
}

Reads lists repository paths whose contents were read or listed, and paths that were only resolved, statted, or found missing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL