added sftp client implementation

This commit is contained in:
ston1th 2022-04-02 20:05:07 +02:00
commit ce73f0472c
175 changed files with 28135 additions and 13 deletions

View file

@ -0,0 +1,45 @@
// Copyright (C) 2022 Marius Schellenberger
package sftp
import (
"errors"
"io/fs"
"github.com/pkg/sftp"
)
var ErrNotConnected = errors.New("sftp not connected")
type connError struct{}
func (connError) Remove(_ string) error {
return ErrNotConnected
}
func (connError) Open(_ string) (*sftp.File, error) {
return nil, ErrNotConnected
}
func (connError) OpenFile(_ string, _ int) (*sftp.File, error) {
return nil, ErrNotConnected
}
func (connError) Stat(_ string) (fs.FileInfo, error) {
return nil, ErrNotConnected
}
func (connError) ReadDir(_ string) ([]fs.FileInfo, error) {
return nil, ErrNotConnected
}
func (connError) MkdirAll(_ string) error {
return ErrNotConnected
}
func (connError) Wait() error {
return ErrNotConnected
}
func (connError) Close() error {
return nil
}