ftp

package module
v0.0.0-...-435eb9f Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

README

FTP Go Reference

Documentation

Overview

Package ftp exposes a ftp server as an io/fs.FS filesystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct {
	// contains filtered or unexported fields
}

FS is an io/fs.ReadDirFS and io/fs.StatFS.

func NewFS

func NewFS(c *jlaftp.ServerConn) *FS

NewFS returns a file system from a ftp connection.

func (*FS) Open

func (fs *FS) Open(name string) (fs.File, error)

Open opens a file.

func (*FS) ReadDir

func (fsys *FS) ReadDir(name string) ([]fs.DirEntry, error)

ReadDir reads a directory.

func (*FS) Stat

func (fs *FS) Stat(name string) (fs.FileInfo, error)

Stat returns the information of a file.

type File

type File struct {
	// contains filtered or unexported fields
}

File is a io/fs.File.

func (*File) Close

func (f *File) Close() error

Close closes the file.

func (*File) Read

func (f *File) Read(b []byte) (int, error)

Stat reads the file.

func (*File) Stat

func (f *File) Stat() (fs.FileInfo, error)

Stat returns the file info.

Jump to

Keyboard shortcuts

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