remote

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package remote implements the FileSystem interface for SFTP/SSH remote filesystems. It provides connection management, automatic reconnection, and parallel directory traversal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RemoteFS

type RemoteFS struct {
	core.UnixPathResolver
	// contains filtered or unexported fields
}

RemoteFS implements FileSystem for SFTP.

func NewRemoteFS

func NewRemoteFS(opts ssh.SSHConfig) (*RemoteFS, error)

NewRemoteFS creates a new SFTP file system.

func (*RemoteFS) Abs

func (fs *RemoteFS) Abs(p string) (string, error)

func (*RemoteFS) Address

func (fs *RemoteFS) Address() string

func (*RemoteFS) Chmod

func (fs *RemoteFS) Chmod(ctx context.Context, p string, mode os.FileMode) error

func (*RemoteFS) Close

func (fs *RemoteFS) Close() error

Close releases the SFTP client and the underlying SSH connection.

func (*RemoteFS) Create

func (fs *RemoteFS) Create(ctx context.Context, p string) (io.WriteCloser, error)

func (*RemoteFS) GetHomeDir

func (fs *RemoteFS) GetHomeDir() (string, error)

func (*RemoteFS) IsLocal

func (fs *RemoteFS) IsLocal() bool

func (*RemoteFS) IsReadOnly

func (fs *RemoteFS) IsReadOnly(ctx context.Context, p string) (bool, error)

func (*RemoteFS) Lstat

func (fs *RemoteFS) Lstat(ctx context.Context, p string) (os.FileInfo, error)

func (*RemoteFS) MkdirAll

func (fs *RemoteFS) MkdirAll(ctx context.Context, p string, perm os.FileMode) error

func (*RemoteFS) Open

func (fs *RemoteFS) Open(ctx context.Context, p string) (io.ReadCloser, error)

func (*RemoteFS) Preallocate

func (fs *RemoteFS) Preallocate(ctx context.Context, path string, size int64) error

func (*RemoteFS) ReadDir

func (fs *RemoteFS) ReadDir(ctx context.Context, p string) ([]os.FileInfo, error)

func (*RemoteFS) ReadDirEntries

func (fs *RemoteFS) ReadDirEntries(ctx context.Context, p string) ([]os.DirEntry, error)

func (*RemoteFS) RemoveAll

func (fs *RemoteFS) RemoveAll(ctx context.Context, p string) error

func (*RemoteFS) Rename

func (fs *RemoteFS) Rename(ctx context.Context, oldPath, newPath string) error

func (*RemoteFS) Separator

func (fs *RemoteFS) Separator() string

func (*RemoteFS) Stat

func (fs *RemoteFS) Stat(ctx context.Context, p string) (os.FileInfo, error)

func (*RemoteFS) User

func (fs *RemoteFS) User() string

func (*RemoteFS) Walk

func (fs *RemoteFS) Walk(ctx context.Context, root string, walkFn filepath.WalkFunc) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址