2014-04-10 00:44:58 +08:00
|
|
|
package filer
|
|
|
|
|
|
|
|
type DirectoryId int32
|
|
|
|
|
|
|
|
type DirectoryEntry struct {
|
|
|
|
Name string //dir name without path
|
|
|
|
Id DirectoryId
|
|
|
|
}
|
|
|
|
|
|
|
|
type DirectoryManager interface {
|
|
|
|
FindDirectory(dirPath string) (DirectoryId, error)
|
2014-05-13 13:57:23 +08:00
|
|
|
ListDirectories(dirPath string) (dirs []DirectoryEntry, err error)
|
2014-04-10 00:44:58 +08:00
|
|
|
MakeDirectory(currentDirPath string, dirName string) (DirectoryId, error)
|
|
|
|
MoveUnderDirectory(oldDirPath string, newParentDirPath string) error
|
|
|
|
DeleteDirectory(dirPath string) error
|
2014-05-13 13:57:23 +08:00
|
|
|
//functions used by FUSE
|
|
|
|
FindDirectoryById(DirectoryId, error)
|
2014-04-10 00:44:58 +08:00
|
|
|
}
|