fs

package
v2.5.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePathBytes

func DecodePathBytes(path []byte) []byte

*

  • Revert non ascii chracters escaped by git or windows (as octal sequences \000) back to bytes.

Types

type Environment

type Environment interface {
	Get(key string) (val string, ok bool)
}

Environment is a copy of a subset of the interface github.com/git-lfs/git-lfs/config.Environment.

For more information, see config/environment.go.

type Filesystem

type Filesystem struct {
	GitStorageDir string   // parent of objects/lfs (may be same as GitDir but may not)
	LFSStorageDir string   // parent of lfs objects and tmp dirs. Default: ".git/lfs"
	ReferenceDirs []string // alternative local media dirs (relative to clone reference repo)
	// contains filtered or unexported fields
}

func New

func New(env Environment, gitdir, workdir, lfsdir string) *Filesystem

New initializes a new *Filesystem with the given directories. gitdir is the path to the bare repo, workdir is the path to the repository working directory, and lfsdir is the optional path to the `.git/lfs` directory.

func (*Filesystem) Cleanup

func (f *Filesystem) Cleanup() error

func (*Filesystem) DecodePathname

func (f *Filesystem) DecodePathname(path string) string

func (*Filesystem) EachObject

func (f *Filesystem) EachObject(fn func(Object) error) error

func (*Filesystem) LFSObjectDir

func (f *Filesystem) LFSObjectDir() string

func (*Filesystem) LogDir

func (f *Filesystem) LogDir() string

func (*Filesystem) ObjectExists

func (f *Filesystem) ObjectExists(oid string, size int64) bool

func (*Filesystem) ObjectPath

func (f *Filesystem) ObjectPath(oid string) (string, error)

func (*Filesystem) ObjectPathname

func (f *Filesystem) ObjectPathname(oid string) string

func (*Filesystem) ObjectReferencePaths

func (f *Filesystem) ObjectReferencePaths(oid string) []string

func (*Filesystem) TempDir

func (f *Filesystem) TempDir() string

type Object

type Object struct {
	Oid  string
	Size int64
}

Object represents a locally stored LFS object.

Jump to

Keyboard shortcuts

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