You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
545 B

  1. package filer
  2. import ()
  3. type FileId string //file id on weedfs
  4. type FileEntry struct {
  5. Name string //file name without path
  6. Id FileId
  7. }
  8. type Filer interface {
  9. CreateFile(filePath string, fid string) (err error)
  10. FindFile(filePath string) (fid string, err error)
  11. ListDirectories(dirPath string) (dirs []DirectoryEntry, err error)
  12. ListFiles(dirPath string, lastFileName string, limit int) (files []FileEntry, err error)
  13. DeleteDirectory(dirPath string, recursive bool) (err error)
  14. DeleteFile(filePath string) (fid string, err error)
  15. }