Documentation ¶
Index ¶
- Constants
- func HandleSIZE(param string, client ftpserver.ClientDriver) (int, string)
- func List(ctx context.Context, path string) ([]os.FileInfo, error)
- func Mkdir(ctx context.Context, path string) error
- func Remove(ctx context.Context, path string) error
- func Rename(ctx context.Context, oldPath, newPath string) error
- func Stat(ctx context.Context, path string) (os.FileInfo, error)
- type AferoAdapter
- func (a *AferoAdapter) Chmod(_ string, _ os.FileMode) error
- func (a *AferoAdapter) Chown(_ string, _, _ int) error
- func (a *AferoAdapter) Chtimes(_ string, _ time.Time, _ time.Time) error
- func (a *AferoAdapter) Create(_ string) (afero.File, error)
- func (a *AferoAdapter) GetHandle(name string, flags int, offset int64) (ftpserver.FileTransfer, error)
- func (a *AferoAdapter) Mkdir(name string, _ os.FileMode) error
- func (a *AferoAdapter) MkdirAll(path string, perm os.FileMode) error
- func (a *AferoAdapter) Name() string
- func (a *AferoAdapter) Open(_ string) (afero.File, error)
- func (a *AferoAdapter) OpenFile(_ string, _ int, _ os.FileMode) (afero.File, error)
- func (a *AferoAdapter) ReadDir(name string) ([]os.FileInfo, error)
- func (a *AferoAdapter) Remove(name string) error
- func (a *AferoAdapter) RemoveAll(path string) error
- func (a *AferoAdapter) Rename(oldName, newName string) error
- func (a *AferoAdapter) SetNextFileSize(size int64)
- func (a *AferoAdapter) Stat(name string) (os.FileInfo, error)
- type FileDownloadProxy
- type FileUploadProxy
- type FileUploadWithLengthProxy
- type OsFileInfoAdapter
- type SftpDriverAdapter
- func (s *SftpDriverAdapter) CreateLink(_, _ string, _ uint32) error
- func (s *SftpDriverAdapter) GetHandle(name string, flags uint32, _ *sftpd.Attr, offset uint64) (sftpd.FileTransfer, error)
- func (s *SftpDriverAdapter) Mkdir(name string, attr *sftpd.Attr) error
- func (s *SftpDriverAdapter) OpenDir(_ string) (sftpd.Dir, error)
- func (s *SftpDriverAdapter) OpenFile(_ string, _ uint32, _ *sftpd.Attr) (sftpd.File, error)
- func (s *SftpDriverAdapter) ReadDir(name string) ([]sftpd.NamedAttr, error)
- func (s *SftpDriverAdapter) ReadLink(_ string) (string, error)
- func (s *SftpDriverAdapter) RealPath(path string) (string, error)
- func (s *SftpDriverAdapter) Remove(name string) error
- func (s *SftpDriverAdapter) Rename(old, new string, _ uint32) error
- func (s *SftpDriverAdapter) Rmdir(name string) error
- func (s *SftpDriverAdapter) SetStat(_ string, _ *sftpd.Attr) error
- func (s *SftpDriverAdapter) Stat(name string, _ bool) (*sftpd.Attr, error)
Constants ¶
View Source
const ( SSH_FXF_READ = 0x00000001 SSH_FXF_WRITE = 0x00000002 SSH_FXF_APPEND = 0x00000004 SSH_FXF_CREAT = 0x00000008 SSH_FXF_TRUNC = 0x00000010 SSH_FXF_EXCL = 0x00000020 )
From leffss/sftpd
Variables ¶
This section is empty.
Functions ¶
func HandleSIZE ¶
func HandleSIZE(param string, client ftpserver.ClientDriver) (int, string)
Types ¶
type AferoAdapter ¶
type AferoAdapter struct {
// contains filtered or unexported fields
}
func NewAferoAdapter ¶
func NewAferoAdapter(ctx context.Context) *AferoAdapter
func (*AferoAdapter) GetHandle ¶
func (a *AferoAdapter) GetHandle(name string, flags int, offset int64) (ftpserver.FileTransfer, error)
func (*AferoAdapter) MkdirAll ¶
func (a *AferoAdapter) MkdirAll(path string, perm os.FileMode) error
func (*AferoAdapter) Name ¶
func (a *AferoAdapter) Name() string
func (*AferoAdapter) Remove ¶
func (a *AferoAdapter) Remove(name string) error
func (*AferoAdapter) RemoveAll ¶
func (a *AferoAdapter) RemoveAll(path string) error
func (*AferoAdapter) Rename ¶
func (a *AferoAdapter) Rename(oldName, newName string) error
func (*AferoAdapter) SetNextFileSize ¶
func (a *AferoAdapter) SetNextFileSize(size int64)
type FileDownloadProxy ¶
type FileDownloadProxy struct { ftpserver.FileTransfer // contains filtered or unexported fields }
func OpenDownload ¶
func OpenDownload(ctx context.Context, path string) (*FileDownloadProxy, error)
func (*FileDownloadProxy) Close ¶
func (f *FileDownloadProxy) Close() error
type FileUploadProxy ¶
type FileUploadProxy struct { ftpserver.FileTransfer // contains filtered or unexported fields }
func OpenUpload ¶
func (*FileUploadProxy) Close ¶
func (f *FileUploadProxy) Close() error
type FileUploadWithLengthProxy ¶
type FileUploadWithLengthProxy struct { ftpserver.FileTransfer // contains filtered or unexported fields }
func OpenUploadWithLength ¶
func (*FileUploadWithLengthProxy) Close ¶
func (f *FileUploadWithLengthProxy) Close() error
func (*FileUploadWithLengthProxy) Read ¶
func (f *FileUploadWithLengthProxy) Read(p []byte) (n int, err error)
type OsFileInfoAdapter ¶
type OsFileInfoAdapter struct {
// contains filtered or unexported fields
}
func (*OsFileInfoAdapter) IsDir ¶
func (o *OsFileInfoAdapter) IsDir() bool
func (*OsFileInfoAdapter) ModTime ¶
func (o *OsFileInfoAdapter) ModTime() time.Time
func (*OsFileInfoAdapter) Mode ¶
func (o *OsFileInfoAdapter) Mode() fs2.FileMode
func (*OsFileInfoAdapter) Name ¶
func (o *OsFileInfoAdapter) Name() string
func (*OsFileInfoAdapter) Size ¶
func (o *OsFileInfoAdapter) Size() int64
func (*OsFileInfoAdapter) Sys ¶
func (o *OsFileInfoAdapter) Sys() any
type SftpDriverAdapter ¶
type SftpDriverAdapter struct {
FtpDriver *AferoAdapter
}
func (*SftpDriverAdapter) CreateLink ¶
func (s *SftpDriverAdapter) CreateLink(_, _ string, _ uint32) error
func (*SftpDriverAdapter) GetHandle ¶
func (s *SftpDriverAdapter) GetHandle(name string, flags uint32, _ *sftpd.Attr, offset uint64) (sftpd.FileTransfer, error)
func (*SftpDriverAdapter) Mkdir ¶
func (s *SftpDriverAdapter) Mkdir(name string, attr *sftpd.Attr) error
func (*SftpDriverAdapter) OpenDir ¶
func (s *SftpDriverAdapter) OpenDir(_ string) (sftpd.Dir, error)
func (*SftpDriverAdapter) OpenFile ¶
func (s *SftpDriverAdapter) OpenFile(_ string, _ uint32, _ *sftpd.Attr) (sftpd.File, error)
func (*SftpDriverAdapter) ReadDir ¶
func (s *SftpDriverAdapter) ReadDir(name string) ([]sftpd.NamedAttr, error)
func (*SftpDriverAdapter) RealPath ¶
func (s *SftpDriverAdapter) RealPath(path string) (string, error)
func (*SftpDriverAdapter) Remove ¶
func (s *SftpDriverAdapter) Remove(name string) error
func (*SftpDriverAdapter) Rename ¶
func (s *SftpDriverAdapter) Rename(old, new string, _ uint32) error
func (*SftpDriverAdapter) Rmdir ¶
func (s *SftpDriverAdapter) Rmdir(name string) error
func (*SftpDriverAdapter) SetStat ¶
func (s *SftpDriverAdapter) SetStat(_ string, _ *sftpd.Attr) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.