embedded_filer

package
v0.0.0-...-9931aa1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanFilePath

func CleanFilePath(fp string) string

Types

type DirectoryEntryInMap

type DirectoryEntryInMap struct {
	sync.Mutex
	Name   string
	Parent *DirectoryEntryInMap

	Id filer.DirectoryId
	// contains filtered or unexported fields
}

type DirectoryManager

type DirectoryManager interface {
	FindDirectory(dirPath string) (filer.DirectoryId, error)
	ListDirectories(dirPath string) (dirs []filer.DirectoryEntry, err error)
	MakeDirectory(currentDirPath string, dirName string) (filer.DirectoryId, error)
	MoveUnderDirectory(oldDirPath string, newParentDirPath string) error
	DeleteDirectory(dirPath string) error
	//functions used by FUSE
	FindDirectoryById(filer.DirectoryId, error)
}

type DirectoryManagerInMap

type DirectoryManagerInMap struct {
	Root *DirectoryEntryInMap
	// contains filtered or unexported fields
}

func NewDirectoryManagerInMap

func NewDirectoryManagerInMap(dirLogFile string) (dm *DirectoryManagerInMap, err error)

func (*DirectoryManagerInMap) DeleteDirectory

func (dm *DirectoryManagerInMap) DeleteDirectory(dirPath string) error

func (*DirectoryManagerInMap) FindDirectory

func (dm *DirectoryManagerInMap) FindDirectory(dirPath string) (filer.DirectoryId, error)

func (*DirectoryManagerInMap) ListDirectories

func (dm *DirectoryManagerInMap) ListDirectories(dirPath string) (dirNames []filer.DirectoryEntry, err error)

func (*DirectoryManagerInMap) MakeDirectory

func (dm *DirectoryManagerInMap) MakeDirectory(dirPath string) (filer.DirectoryId, error)

func (*DirectoryManagerInMap) MoveUnderDirectory

func (dm *DirectoryManagerInMap) MoveUnderDirectory(oldDirPath string, newParentDirPath string, newName string) error

type FileListInLevelDb

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

func NewFileListInLevelDb

func NewFileListInLevelDb(dir string) (fl *FileListInLevelDb, err error)

func (*FileListInLevelDb) CreateFile

func (fl *FileListInLevelDb) CreateFile(dirId filer.DirectoryId, fileName string, fid string) (err error)

func (*FileListInLevelDb) DeleteFile

func (fl *FileListInLevelDb) DeleteFile(dirId filer.DirectoryId, fileName string) (fid string, err error)

func (*FileListInLevelDb) FindFile

func (fl *FileListInLevelDb) FindFile(dirId filer.DirectoryId, fileName string) (fid string, err error)

func (*FileListInLevelDb) ListFiles

func (fl *FileListInLevelDb) ListFiles(dirId filer.DirectoryId, lastFileName string, limit int) (files []filer.FileEntry)

type FilerEmbedded

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

func NewFilerEmbedded

func NewFilerEmbedded(master string, dir string) (filer *FilerEmbedded, err error)

func (*FilerEmbedded) CreateFile

func (filer *FilerEmbedded) CreateFile(filePath string, fid string) (err error)

func (*FilerEmbedded) DeleteDirectory

func (filer *FilerEmbedded) DeleteDirectory(dirPath string, recursive bool) (err error)

func (*FilerEmbedded) DeleteFile

func (filer *FilerEmbedded) DeleteFile(filePath string) (fid string, err error)

func (*FilerEmbedded) FindDirectory

func (filer *FilerEmbedded) FindDirectory(dirPath string) (dirId filer.DirectoryId, err error)

func (*FilerEmbedded) FindFile

func (filer *FilerEmbedded) FindFile(filePath string) (fid string, err error)

func (*FilerEmbedded) ListDirectories

func (filer *FilerEmbedded) ListDirectories(dirPath string) (dirs []filer.DirectoryEntry, err error)

func (*FilerEmbedded) ListFiles

func (filer *FilerEmbedded) ListFiles(dirPath string, lastFileName string, limit int) (files []filer.FileEntry, err error)

func (*FilerEmbedded) Move

func (filer *FilerEmbedded) Move(fromPath string, toPath string) error

Move a folder or a file, with 4 Use cases: mv fromDir toNewDir mv fromDir toOldDir mv fromFile toDir mv fromFile toFile

Jump to

Keyboard shortcuts

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