httpfile

package
v2.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFS = &FS{
	Client: http.DefaultClient,
}
View Source
var (
	ErrNotFound = os.ErrNotExist
)

Functions

func GetLength

func GetLength(url string) (ret int64, err error)

Returns the length of the resource in bytes.

Types

type FS

type FS struct {
	Client *http.Client
}

func (*FS) Delete

func (fs *FS) Delete(urlStr string) (err error)

func (*FS) GetLength

func (fs *FS) GetLength(url string) (ret int64, err error)

func (*FS) Open

func (fs *FS) Open(url string, flags int) (ret *File, err error)

func (*FS) OpenSectionReader

func (fs *FS) OpenSectionReader(url string, off, n int64) (ret io.ReadCloser, err error)

type File

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

func (*File) Close

func (me *File) Close() error

func (*File) Read

func (me *File) Read(b []byte) (n int, err error)

func (*File) Seek

func (me *File) Seek(offset int64, whence int) (ret int64, err error)

func (*File) Write

func (me *File) Write(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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