ftp_fs.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. package ftpd
  2. import (
  3. "github.com/chrislusf/seaweedfs/weed/util"
  4. "github.com/spf13/afero"
  5. "net"
  6. "os"
  7. "time"
  8. )
  9. type FtpFileSystem struct {
  10. option *FtpServerOption
  11. ftpListener net.Listener
  12. }
  13. var (
  14. _ = afero.Fs(&FtpFileSystem{})
  15. )
  16. // NewServer returns a new FTP server driver
  17. func NewFtpFileSystem(option *FtpServerOption) (*FtpFileSystem, error) {
  18. return &FtpFileSystem{
  19. option: option,
  20. }, nil
  21. }
  22. func (fs *FtpFileSystem) Create(name string) (afero.File, error) {
  23. }
  24. func (fs *FtpFileSystem) Mkdir(name string, perm os.FileMode) error {
  25. }
  26. func (fs *FtpFileSystem) MkdirAll(path string, perm os.FileMode) error {
  27. }
  28. func (fs *FtpFileSystem) Open(name string) (afero.File, error) {
  29. }
  30. func (fs *FtpFileSystem) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error) {
  31. }
  32. func (fs *FtpFileSystem) Remove(name string) error {
  33. }
  34. func (fs *FtpFileSystem) RemoveAll(path string) error {
  35. }
  36. func (fs *FtpFileSystem) Rename(oldname, newname string) error {
  37. }
  38. func (fs *FtpFileSystem) Stat(name string) (os.FileInfo, error) {
  39. }
  40. func (fs *FtpFileSystem) Name() string {
  41. return "SeaweedFS FTP Server " + util.Version()
  42. }
  43. func (fs *FtpFileSystem) Chmod(name string, mode os.FileMode) error {
  44. }
  45. func (fs *FtpFileSystem) Chtimes(name string, atime time.Time, mtime time.Time) error {
  46. }