localfs

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Repo = LocalRepo{/* contains filtered or unexported fields */}

Functions

This section is empty.

Types

type LocalRepo

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

func (LocalRepo) CreateDir

func (r LocalRepo) CreateDir(m *model.Model, parentPath, dirName string) bool

func (LocalRepo) Delete

func (r LocalRepo) Delete(m *model.Model, parentPath, fileName string) bool

func (LocalRepo) EnterCurrentDirectory

func (r LocalRepo) EnterCurrentDirectory(m *model.Model)

func (LocalRepo) GetFile

func (r LocalRepo) GetFile(m *model.Model, parentPath, fileName string) []byte

func (LocalRepo) GetFileByPath

func (r LocalRepo) GetFileByPath(filePath string) []byte

func (LocalRepo) GetFileName

func (r LocalRepo) GetFileName(filePath string) string

func (LocalRepo) GetFilePath

func (r LocalRepo) GetFilePath(parentPath, fileName string) string

func (LocalRepo) GetFileType

func (r LocalRepo) GetFileType(m *model.Model, parentPath, fileName string) byte

func (LocalRepo) GetFileTypeFromPath

func (r LocalRepo) GetFileTypeFromPath(m *model.Model, filePath string) byte

func (LocalRepo) IsEmptyDir

func (r LocalRepo) IsEmptyDir(m *model.Model, parentPath, dirName string) bool

func (LocalRepo) ListFiles

func (r LocalRepo) ListFiles(m *model.Model, dirPath string) []model.Item

func (LocalRepo) Load

func (r LocalRepo) Load(m *model.Model)

func (LocalRepo) LoadCurrent

func (r LocalRepo) LoadCurrent(m *model.Model)

func (LocalRepo) LoadTree

func (r LocalRepo) LoadTree(pathFromRoot, filePath string) (LocalfsTree, error)

func (LocalRepo) String

func (r LocalRepo) String() string

func (LocalRepo) UpdateFile

func (r LocalRepo) UpdateFile(m *model.Model, parentPath, fileName string, newFileContent []byte) bool

type LocalfsError

type LocalfsError struct {
	Message string
}

LocalfsError records error on using local filesystem.

func (*LocalfsError) Error

func (e *LocalfsError) Error() string

type LocalfsTree

type LocalfsTree struct {
	Dir          bool
	Name         string
	Path         string
	PathFromRoot string
	ModTime      time.Time
	Children     []LocalfsTree
}

LocalfsTree represents file/dir with all it's children and modification time.

func (LocalfsTree) FileChanged

func (t LocalfsTree) FileChanged(anotherTree *LocalfsTree) bool

FileChanged check if this file is new or changed file comparing to saved info.

func (LocalfsTree) FindChild

func (t LocalfsTree) FindChild(searchChild *LocalfsTree) *LocalfsTree

FindChild finds child of same type and name as one we search for.

func (LocalfsTree) String

func (t LocalfsTree) String() string

Jump to

Keyboard shortcuts

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