stream

package
v0.0.0-...-271b4c5 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2018 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotSupported = errors.New("stream: method or operation not supported")

Functions

This section is empty.

Types

type AttrStream

type AttrStream interface {
	Attr(v interface{}) interface{}
}

type Chdir

type Chdir interface {
	Chdir(path string) error
	Getwd() string
}

TODO move chdir to global context

type Flusher

type Flusher interface {
	Flush() error
}

Flusher is a stream with a flush method, such as bufio.Writer

type Handler

type Handler interface {
	Open(path *url.URL) (*Stream, error)
	Exists(path *url.URL) (bool, error)
	Stat(path *url.URL) (os.FileInfo, error)
	Lstat(path *url.URL) (os.FileInfo, error)
}

func NewFileHandler

func NewFileHandler(root string) (Handler, error)

func PhpHandler

func PhpHandler() Handler

type HandlerDir

type HandlerDir interface {
	OpenDir(path *url.URL) (*Stream, error) // stream?
	Mkdir(path *url.URL)
	RmDir(path *url.URL)
}

type HandlerWriter

type HandlerWriter interface {
	Rename(from, to *url.URL) error
}

type Stater

type Stater interface {
	Stat() (os.FileInfo, error)
}

type Stream

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

func NewStream

func NewStream(f interface{}) *Stream

func (*Stream) Attr

func (s *Stream) Attr(v interface{}) interface{}

func (*Stream) Close

func (s *Stream) Close() error

func (*Stream) Flush

func (s *Stream) Flush() error

func (*Stream) Read

func (s *Stream) Read(p []byte) (int, error)

func (*Stream) ReadByte

func (s *Stream) ReadByte() (byte, error)

func (*Stream) Seek

func (s *Stream) Seek(offset int64, whence int) (int64, error)

func (*Stream) SetAttr

func (s *Stream) SetAttr(k string, v interface{})

func (*Stream) Stat

func (s *Stream) Stat() (os.FileInfo, error)

func (*Stream) Sync

func (s *Stream) Sync() error

func (*Stream) Write

func (s *Stream) Write(p []byte) (n int, err error)

type Syncer

type Syncer interface {
	Sync() error
}

Jump to

Keyboard shortcuts

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