func (f *file) Mode() os.FileMode {
	return os.FileMode(f.mode)
}
Mode returns file mode bits
package static
import (
	"bytes"
	"errors"
	"io"
	"net/http"
	"os"
	"time"
)
type httpFile struct {
	*bytes.Reader
	*file
}
type file struct {
	data         []byte
	path         string
	name         string
	size         int64
	mode         os.FileMode
	modTime      int64
	isDir        bool
	files        []*file
	lastDirIndex int
}
func (f *file) File() (http.File, error) {
	return &httpFile{
		bytes.NewReader(f.data),
		f,
	}, nil
}
func (f *file) Close() error {
	return nil
}
func (f *file) Readdir(count int) ([]os.FileInfo, error) {
	if !f.IsDir() {
		return nil, errors.New("not a directory")
	}
	var files []os.FileInfo
	if count <= 0 {
		files = make([]os.FileInfo, len(f.files))
		count = len(f.files)
		f.lastDirIndex = 0
	} else {
		files = make([]os.FileInfo, count)
		count += f.lastDirIndex
	}
	if f.lastDirIndex >= len(f.files) {
		f.lastDirIndex = 0
		return nil, io.EOF
	}
	if count+f.lastDirIndex >= len(f.files) {
		count = len(f.files)
	}
	i := f.lastDirIndex
	var j int
	for i = f.lastDirIndex; i < count; i++ {
		files[j] = f.files[i]
		j++
	}
	if count > 0 {
		f.lastDirIndex += j
	}
	return files[:j], nil
}
func (f *file) Stat() (os.FileInfo, error) {
	return f, nil
}
func (f *file) Name() string {
	return f.name
}
func (f *file) Size() int64 {
	return f.size
}