Documentation
¶
Index ¶
- Variables
- type LocalRepo
- func (r LocalRepo) CreateDir(m *model.Model, parentPath, dirName string) bool
- func (r LocalRepo) Delete(m *model.Model, parentPath, fileName string) bool
- func (r LocalRepo) EnterCurrentDirectory(m *model.Model)
- func (r LocalRepo) GetFile(m *model.Model, parentPath, fileName string) []byte
- func (r LocalRepo) GetFileByPath(filePath string) []byte
- func (r LocalRepo) GetFileName(filePath string) string
- func (r LocalRepo) GetFilePath(parentPath, fileName string) string
- func (r LocalRepo) GetFileType(m *model.Model, parentPath, fileName string) byte
- func (r LocalRepo) GetFileTypeFromPath(m *model.Model, filePath string) byte
- func (r LocalRepo) IsEmptyDir(m *model.Model, parentPath, dirName string) bool
- func (r LocalRepo) ListFiles(m *model.Model, dirPath string) []model.Item
- func (r LocalRepo) Load(m *model.Model)
- func (r LocalRepo) LoadCurrent(m *model.Model)
- func (r LocalRepo) LoadTree(pathFromRoot, filePath string) (LocalfsTree, error)
- func (r LocalRepo) String() string
- func (r LocalRepo) UpdateFile(m *model.Model, parentPath, fileName string, newFileContent []byte) bool
- type LocalfsError
- type LocalfsTree
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) EnterCurrentDirectory ¶
func (LocalRepo) GetFileByPath ¶
func (LocalRepo) GetFileName ¶
func (LocalRepo) GetFilePath ¶
func (LocalRepo) GetFileType ¶
func (LocalRepo) GetFileTypeFromPath ¶
func (LocalRepo) IsEmptyDir ¶
func (LocalRepo) LoadCurrent ¶
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
Click to show internal directories.
Click to hide internal directories.