// 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 }