Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
File represents a file in the virtual file system: every node is either a regular file or a directory. Symlinks are dereferenced in the implementations.
type Filer ¶
type Filer interface { // ReadFile returns the contents of a file given it's path. ReadFile(path string) (content []byte, err error) // ReadDir lists a directory. ReadDir(path string) ([]File, error) // Close frees all the resources allocated by this Filer. Close() // PathsAreAlwaysSlash indicates whether the path separator is platform-independent ("/") or // OS-specific. PathsAreAlwaysSlash() bool }
A Filer provides a list of files.
func FromDirectory ¶
FromDirectory returns a Filer that allows accessing over all the files contained in a directory.
func FromFS ¶ added in v4.3.1
FromFS returns a Filer that allows accessing all files in the given file system.
func FromGit ¶
func FromGit(repo *git.Repository, headRef plumbing.ReferenceName) (Filer, error)
FromGit returns a Filer that allows accessing all the files in a Git repository
func FromGitURL ¶
FromGitURL returns a Filer that allows to access all the files in a Git repository's default branch given its URL. It keeps a shallow single-branch clone of the repository in memory.