func New(config *Config, dirFile *DirFile) (*Files, error) {
	files := map[string]*file{}
	if config.UseStaticFiles {
		processFiles(files, dirFile)
	} else {
		if strings.Contains(config.AbsPkgPath, "$") {
			config.AbsPkgPath = os.ExpandEnv(config.AbsPkgPath)
		}
		if !filepath.IsAbs(config.AbsPkgPath) {
			return nil, errors.New("AbsPkgPath is required when not using static files otherwise the static package has no idea where to grab local files from when your package is used from within another package.")
		}
	}
	return &Files{
		dir: dir{
			useStaticFiles: config.UseStaticFiles,
			fallbackToDisk: config.FallbackToDisk,
			files:          files,
			absPkgPath:     filepath.Clean(config.AbsPkgPath),
		},
	}, nil
}
New create a new static file instance.
package static
import (
	"bytes"
	"compress/gzip"
	"encoding/base64"
	"errors"
	"io/ioutil"
	"log"
	"net/http"
	"os"
	"path/filepath"
	"sort"
	"strings"
)
const (
	pathSep = "/"
)
type DirFile struct {
	Path       string
	Name       string
	Size       int64
	Mode       os.FileMode
	ModTime    int64
	IsDir      bool
	Compressed string
	Files      []*DirFile
}
type Files struct {
	dir dir
}
type Config struct {
	UseStaticFiles bool
	FallbackToDisk bool    
	AbsPkgPath     string  
}