fs

package
v0.0.0-...-e64dc14 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2016 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultFS = NewFS()
)

Functions

This section is empty.

Types

type FS

type FS struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewFS

func NewFS() *FS

func (*FS) Add

func (fs *FS) Add(fl *FileListing) bool

func (*FS) Open

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

func (*FS) OpenRoot

func (fs *FS) OpenRoot(root, name string) (http.File, error)

type File

type File struct {
	*bytes.Reader
	*FileListing
}

func NewFile

func NewFile(fl *FileListing) File

func (File) Close

func (f File) Close() error

type FileInfo

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

func (FileInfo) IsDir

func (fi FileInfo) IsDir() bool

func (FileInfo) ModTime

func (fi FileInfo) ModTime() time.Time

func (FileInfo) Mode

func (fi FileInfo) Mode() os.FileMode

func (FileInfo) Name

func (fi FileInfo) Name() string

func (FileInfo) Size

func (fi FileInfo) Size() int64

func (FileInfo) Sys

func (fi FileInfo) Sys() interface{}

type FileListing

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

func NewFileListing

func NewFileListing(name string, size int64, mode os.FileMode, modTime time.Time, data []byte) *FileListing

func (*FileListing) Open

func (fl *FileListing) Open() File

func (*FileListing) Readdir

func (fl *FileListing) Readdir(count int) (fi []os.FileInfo, err error)

func (*FileListing) Stat

func (fl *FileListing) Stat() (os.FileInfo, error)

Jump to

Keyboard shortcuts

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