|
@ -6,7 +6,7 @@ import ( |
|
|
"github.com/chrislusf/seaweedfs/go/filer" |
|
|
"github.com/chrislusf/seaweedfs/go/filer" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
type FlatNamesapceFiler struct { |
|
|
|
|
|
|
|
|
type FlatNamespaceFiler struct { |
|
|
master string |
|
|
master string |
|
|
store FlatNamespaceStore |
|
|
store FlatNamespaceStore |
|
|
} |
|
|
} |
|
@ -15,36 +15,36 @@ var ( |
|
|
ErrNotImplemented = errors.New("Not Implemented for flat namespace meta data store") |
|
|
ErrNotImplemented = errors.New("Not Implemented for flat namespace meta data store") |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
func NewFlatNamesapceFiler(master string, store FlatNamespaceStore) *FlatNamesapceFiler { |
|
|
|
|
|
return &FlatNamesapceFiler{ |
|
|
|
|
|
|
|
|
func NewFlatNamespaceFiler(master string, store FlatNamespaceStore) *FlatNamespaceFiler { |
|
|
|
|
|
return &FlatNamespaceFiler{ |
|
|
master: master, |
|
|
master: master, |
|
|
store: store, |
|
|
store: store, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (filer *FlatNamesapceFiler) CreateFile(fullFileName string, fid string) (err error) { |
|
|
|
|
|
|
|
|
func (filer *FlatNamespaceFiler) CreateFile(fullFileName string, fid string) (err error) { |
|
|
return filer.store.Put(fullFileName, fid) |
|
|
return filer.store.Put(fullFileName, fid) |
|
|
} |
|
|
} |
|
|
func (filer *FlatNamesapceFiler) FindFile(fullFileName string) (fid string, err error) { |
|
|
|
|
|
|
|
|
func (filer *FlatNamespaceFiler) FindFile(fullFileName string) (fid string, err error) { |
|
|
return filer.store.Get(fullFileName) |
|
|
return filer.store.Get(fullFileName) |
|
|
} |
|
|
} |
|
|
func (filer *FlatNamesapceFiler) FindDirectory(dirPath string) (dirId filer.DirectoryId, err error) { |
|
|
|
|
|
|
|
|
func (filer *FlatNamespaceFiler) FindDirectory(dirPath string) (dirId filer.DirectoryId, err error) { |
|
|
return 0, ErrNotImplemented |
|
|
return 0, ErrNotImplemented |
|
|
} |
|
|
} |
|
|
func (filer *FlatNamesapceFiler) ListDirectories(dirPath string) (dirs []filer.DirectoryEntry, err error) { |
|
|
|
|
|
|
|
|
func (filer *FlatNamespaceFiler) ListDirectories(dirPath string) (dirs []filer.DirectoryEntry, err error) { |
|
|
return nil, ErrNotImplemented |
|
|
return nil, ErrNotImplemented |
|
|
} |
|
|
} |
|
|
func (filer *FlatNamesapceFiler) ListFiles(dirPath string, lastFileName string, limit int) (files []filer.FileEntry, err error) { |
|
|
|
|
|
|
|
|
func (filer *FlatNamespaceFiler) ListFiles(dirPath string, lastFileName string, limit int) (files []filer.FileEntry, err error) { |
|
|
return nil, ErrNotImplemented |
|
|
return nil, ErrNotImplemented |
|
|
} |
|
|
} |
|
|
func (filer *FlatNamesapceFiler) DeleteDirectory(dirPath string, recursive bool) (err error) { |
|
|
|
|
|
|
|
|
func (filer *FlatNamespaceFiler) DeleteDirectory(dirPath string, recursive bool) (err error) { |
|
|
return ErrNotImplemented |
|
|
return ErrNotImplemented |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (filer *FlatNamesapceFiler) DeleteFile(fullFileName string) (fid string, err error) { |
|
|
|
|
|
|
|
|
func (filer *FlatNamespaceFiler) DeleteFile(fullFileName string) (fid string, err error) { |
|
|
return filer.store.Delete(fullFileName) |
|
|
return filer.store.Delete(fullFileName) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (filer *FlatNamesapceFiler) Move(fromPath string, toPath string) error { |
|
|
|
|
|
|
|
|
func (filer *FlatNamespaceFiler) Move(fromPath string, toPath string) error { |
|
|
return ErrNotImplemented |
|
|
return ErrNotImplemented |
|
|
} |
|
|
} |