localstorage

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package localstorage handles LFS content stored locally NOTE: Subject to change, do not rely on this package from outside git-lfs source

Index

Constants

This section is empty.

Variables

View Source
var (
	TempDir = filepath.Join(os.TempDir(), "git-lfs")
)

Functions

func InitStorage added in v1.5.3

func InitStorage() error

func InitStorageOrFail added in v1.5.3

func InitStorageOrFail()

func ResetTempDir added in v1.3.0

func ResetTempDir() error

func ResolveDirs added in v1.3.0

func ResolveDirs()

func TempFile added in v1.3.0

func TempFile(prefix string) (*os.File, error)

Types

type LocalStorage

type LocalStorage struct {
	RootDir string
	TempDir string
}

LocalStorage manages the locally stored LFS objects for a repository.

func NewStorage added in v1.3.0

func NewStorage(storageDir, tempDir string) (*LocalStorage, error)

func Objects added in v1.3.0

func Objects() *LocalStorage

func (*LocalStorage) AllObjects

func (s *LocalStorage) AllObjects() []Object

AllObjects returns a slice of the the objects stored in this LocalStorage object. This does not necessarily mean referenced by commits, just stored. Note: reports final SHA only, extensions are ignored.

func (*LocalStorage) BuildObjectPath

func (s *LocalStorage) BuildObjectPath(oid string) (string, error)

func (*LocalStorage) ClearTempObjects

func (s *LocalStorage) ClearTempObjects() error

func (*LocalStorage) ObjectPath

func (s *LocalStorage) ObjectPath(oid string) string

func (*LocalStorage) ScanObjectsChan

func (s *LocalStorage) ScanObjectsChan() <-chan Object

ScanObjectsChan returns a channel of all the objects stored in this LocalStorage object. This does not necessarily mean referenced by commits, just stored. You should not alter the store until this channel is closed. Note: reports final SHA only, extensions are ignored.

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