uri

package
v0.4.3-beta.0...-7b504ae Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2016 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Folder

type Folder struct {
	Files []Uri
}

type Handler

type Handler func(root Uri, u Uri) error

type OpenError

type OpenError struct {
	Uri     string
	Message string
}

func (OpenError) Error

func (e OpenError) Error() string

type ParseError

type ParseError struct {
	Uri     string
	Message string
}

func (ParseError) Error

func (e ParseError) Error() string

type Permission

type Permission interface {
}

type ProtocolError

type ProtocolError struct {
	Protocol string
	Message  string
}

func (ProtocolError) Error

func (e ProtocolError) Error() string

type Uri

type Uri interface {
	Scheme() string
	Host() string
	Path() string
	Uri() string
	Abs() string
	Parent() (Uri, error)

	Create(bool, os.FileMode) error
	OpenRead() (io.ReadCloser, error)
	OpenWrite() (io.WriteCloser, error)
	Remove() error
	Walk(dh, fh Handler) error //dh is the handler to handle a directory,and fh is the handler to handle a file.

	IsDir() bool
	Exist() bool
	IsAbs() bool

	Mode() os.FileMode
	ModTime() time.Time
	// contains filtered or unexported methods
}

func Parse

func Parse(u string) (Uri, error)

type UriFtp

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

func (*UriFtp) Host

func (u *UriFtp) Host() string

func (*UriFtp) Scheme

func (u *UriFtp) Scheme() string

type UriLocal

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

func (*UriLocal) Abs

func (u *UriLocal) Abs() string

func (*UriLocal) Create

func (u *UriLocal) Create(IsDir bool, m os.FileMode) (err error)

func (*UriLocal) Exist

func (u *UriLocal) Exist() bool

func (*UriLocal) Host

func (u *UriLocal) Host() string

func (*UriLocal) IsAbs

func (u *UriLocal) IsAbs() bool

func (*UriLocal) IsDir

func (u *UriLocal) IsDir() bool

func (*UriLocal) ModTime

func (u *UriLocal) ModTime() time.Time

func (*UriLocal) Mode

func (u *UriLocal) Mode() os.FileMode

func (*UriLocal) OpenRead

func (u *UriLocal) OpenRead() (io.ReadCloser, error)

func (*UriLocal) OpenWrite

func (u *UriLocal) OpenWrite() (io.WriteCloser, error)

func (*UriLocal) Parent

func (u *UriLocal) Parent() (Uri, error)

func (*UriLocal) Path

func (u *UriLocal) Path() string

func (*UriLocal) Remove

func (u *UriLocal) Remove() error

func (*UriLocal) Scheme

func (u *UriLocal) Scheme() string

func (*UriLocal) Uri

func (u *UriLocal) Uri() string

func (*UriLocal) Walk

func (u *UriLocal) Walk(dh, fh Handler) error

Jump to

Keyboard shortcuts

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