Documentation ¶
Index ¶
- Variables
- func ChMTime(path string, t time.Time) error
- func CreateNodes(fid string, nodes []ddrv.Node) error
- func Delete(id, parent string) error
- func GetNodes(fid string) ([]ddrv.Node, error)
- func Load(dp DataProvider)
- func Mkdir(path string) error
- func Mv(name, newname string) error
- func Name() string
- func Rm(path string) error
- func Touch(path string) error
- func Truncate(fid string) error
- type DataProvider
- type File
- func Create(name, parent string, isDir bool) (*File, error)
- func Get(id, parent string) (*File, error)
- func GetChild(id string) ([]*File, error)
- func Ls(path string, limit int, offset int) ([]*File, error)
- func Stat(path string) (*File, error)
- func Update(id, parent string, file *File) (*File, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExist = os.ErrExist ErrNotExist = os.ErrNotExist ErrPermission = os.ErrPermission ErrInvalidParent = &os.PathError{Err: errors.New("parent does not exist or not a directory")} )
Functions ¶
func Load ¶
func Load(dp DataProvider)
Types ¶
type DataProvider ¶
type DataProvider interface { Name() string Get(id, parent string) (*File, error) GetChild(id string) ([]*File, error) Create(name, parent string, isDir bool) (*File, error) Update(id, parent string, file *File) (*File, error) Delete(id, parent string) error GetNodes(id string) ([]ddrv.Node, error) CreateNodes(id string, nodes []ddrv.Node) error Truncate(id string) error Stat(path string) (*File, error) Ls(path string, limit int, offset int) ([]*File, error) Touch(path string) error Mkdir(path string) error Rm(path string) error Mv(name, newname string) error CHTime(path string, time time.Time) error Close() error }
Click to show internal directories.
Click to hide internal directories.