mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
263 lines
19 KiB
Go
263 lines
19 KiB
Go
|
// Code generated by go-bindata.
|
||
|
// sources:
|
||
|
// assets/source/styles.css
|
||
|
// assets/source/template.tmpl
|
||
|
// DO NOT EDIT!
|
||
|
|
||
|
package assets
|
||
|
|
||
|
import (
|
||
|
"bytes"
|
||
|
"compress/gzip"
|
||
|
"fmt"
|
||
|
"io"
|
||
|
"io/ioutil"
|
||
|
"os"
|
||
|
"path/filepath"
|
||
|
"strings"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func bindataRead(data []byte, name string) ([]byte, error) {
|
||
|
gz, err := gzip.NewReader(bytes.NewBuffer(data))
|
||
|
if err != nil {
|
||
|
return nil, fmt.Errorf("Read %q: %v", name, err)
|
||
|
}
|
||
|
|
||
|
var buf bytes.Buffer
|
||
|
_, err = io.Copy(&buf, gz)
|
||
|
clErr := gz.Close()
|
||
|
|
||
|
if err != nil {
|
||
|
return nil, fmt.Errorf("Read %q: %v", name, err)
|
||
|
}
|
||
|
if clErr != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
return buf.Bytes(), nil
|
||
|
}
|
||
|
|
||
|
type asset struct {
|
||
|
bytes []byte
|
||
|
info os.FileInfo
|
||
|
}
|
||
|
|
||
|
type bindataFileInfo struct {
|
||
|
name string
|
||
|
size int64
|
||
|
mode os.FileMode
|
||
|
modTime time.Time
|
||
|
}
|
||
|
|
||
|
func (fi bindataFileInfo) Name() string {
|
||
|
return fi.name
|
||
|
}
|
||
|
func (fi bindataFileInfo) Size() int64 {
|
||
|
return fi.size
|
||
|
}
|
||
|
func (fi bindataFileInfo) Mode() os.FileMode {
|
||
|
return fi.mode
|
||
|
}
|
||
|
func (fi bindataFileInfo) ModTime() time.Time {
|
||
|
return fi.modTime
|
||
|
}
|
||
|
func (fi bindataFileInfo) IsDir() bool {
|
||
|
return false
|
||
|
}
|
||
|
func (fi bindataFileInfo) Sys() interface{} {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
var _assetsSourceStylesCss = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x94\x55\xdd\x4e\xe3\x3c\x10\xbd\x6e\xa5\xbe\x83\x25\x84\x04\x9f\x48\x95\x14\xca\x27\xd2\x9b\x95\xf6\x1d\xf6\x7e\x12\x4f\x1a\x0b\xc7\x8e\x6c\x97\x96\x45\xfb\xee\x3b\x76\xea\xc6\xa1\x61\x57\x4b\x90\x48\xe6\xcf\x33\xe7\x1c\x0f\xff\xb1\x0f\xd6\x03\xe7\x42\xed\x4b\x96\xef\x58\x07\x66\x2f\x54\x78\xfd\xb5\x5a\xae\x96\x95\xe6\xef\xec\x63\xb5\x5c\x34\x5a\xb9\xac\x81\x4e\xc8\xf7\x92\x59\x50\x36\xb3\x68\x44\xb3\x23\x97\xc3\x93\xcb\x0c\x2a\x4e\x06\x5f\x46\xf7\x4e\x74\xe2\x27\xda\x1e\x91\x53\x40\x28\x04\xa1\x4a\xad\xa5\x36\x25\xbb\xc9\xf3\x67\xe4\x8f\x97\x64\x8e\xb5\x36\xe0\x84\xa6\x93\x95\x56\x78\x49\x2a\x5b\xfd\x86\xe6\x61\xb5\x6c\x0b\x76\xfe\x98\xd4\x79\x2c\x5e\xea\xa6\x89\xe1\x2d\x02\x0f\xd1\x37\xf6\xd0\xd1\x24\x43\xe7\xe7\xf1\x32\x89\x8d\x2b\xd9\xf6\x76\x97\xd8\x8c\xd8\xb7\xd1\x18\x4a\xb8\xb6\x6c\x84\xb1\x2e\xab\x5b\x21\x39\x95\x72\x3c\x35\x7c\x55\x30\xe6\x4a\x98\xa6\x8e\xdf\x93\xcc\xab\x63\x87\xce\x27\x31\x4e\xf7\x25\xdb\x6c\xfb\x53\xda\x6f\xa5\x9d\xd3\x5d\xc9\x8a\xb3\xbd\x82\xfa\x75\x6f\xf4\x41\xf1\x2c\x42\xd2\x6c\xfc\x73\x29\x5c\x8c\xec\x59\xe2\x84\x4a\xe6\x43\x6a\x30\x1d\x71\xe8\x44\x69\xd3\x81\xf4\xe6\x63\x2b\x1c\x66\xb6\x87\x1a\xbd\xf9\x68\xa0\xf7\x66\x8f\x7c\x23\xf5\x31\x3b\x95\xac\x15\x9c\xa3\xba\x90\x17\x5d\x25\x43\x29\x45\x6f\x85\x4d\x0e\x9f\xd0\x2e\x54\x4b\x12\x71\xa9\x3b\xe1\xf4\x4a\x09\x07\xaf\x28\x29\x46\x39\x74\x20\x54\x08\xe5\xc2\xf6\x12\x48\x88\x95\xd4\xf5\x6b\x74\xaf\x3b\x74\xf0\x79\xdc\x62\x93\x8c\x1b\xf5\xfb\x03\x0d\x07\x05\x0f\x9f\x84\x5c\x69\x43\x27\x8e\x20\xf7\x27\x66\xb5\x14\x9c\xdd\xbc\x7c\xf7\xcf\xee\x33\x3d\xc5\x9f\xe9\x19\xbb\xca\x08\xd4\x2e\xb4\x36\x5c\xb0\xa8\x80\x02\xbb\x8b\x7a\xa0\x92\x18\x42\x8e\x82\x93\x94\x58\x91\xe7\xb7\x49\x57\x84\xa1\x84\xde\xd2\x48\xf1\xed\x92\x39\xe0\x37\xd3\x3d\x07\xdb\x22\xb5\xcf\xc1\x3f\x63\x7c\xa9\xb4\xbb\x4b\x75\x7d\x9f\xf0\x30\xa7\x29\xfa\xc1\x7a\xd4\x79\x10\xf7\x48\x1a\x48\xb1\x27\xbe\xfc\x7d\x48\xd0\xf0\x13\x50\x0f\xf9\x98\x76\xad\xef\xbf\x00\x38\x21\xf2\x79\x30\xcd\x0b\x34\x9e\x30\xd1\x5b\x25\x61\x54\x07\x39\xed\xdb\x3e\xb8\x69\x52\x27\x6a\x90\xb1\xf1\x8e\x04\x2d\x47\x38\xf9\x95\x86\x9e\x46\x3a\x67\xf6\xc1\x99\xaf\x6d\xfe\x0f\x9b\x20\xc5\x2d\x68\xe1\x8b\xfa\xb1\xe5\x5e\x5b\x31\xdc\x0a\xa8\x48\x93\x07\x97\xb6\xbb\x56\xd0\xe1\xc0\xc9\x7a\xaf\x0f\x7d\x2a\xb4\x61\x49\x15\xeb\xff\xb7\x41\x6a\x8b\x23\xa9\x24\xab\x0c\xc2\x2b\xe1\xe3\xff\x50\x17\x72\x72\xc3\x3d\xa2\xd1\xe7\xa3\xaf\x40\xef\x0d\x66\x29\xec\x8d\xd6\x6e\xba\xbc\x4a\xf6\xe4\xa9\x9f\xac\x9a\xe9\x75\x4c\xe7\xaf\x51\x51\x7e\xac\xf6\xad\x43\x2e\x80\xdd\x75\x70\xca\xce\xc8\x3e\xe7\x54\xe8\x3e\x1c\xb0\xa6\xe5\x83\x97\x9b\x32\x2e\x82\xf3\x7f\x8d\x45\x28\xb1\x98\x21\x29\xb2\x04\x07\xa7\x93\xc0\xb6\x54\xae\x1d\xc2\xee\x36\xf7\x0f\x43\x6e\x6a\x1a\x92\xe7\x16\xf7\x62\x96\x44\x5f\x98\x7e\x7f\x07\x00\x00\xff\xff\x8c\x4d\x45\x42\x58\x07\x00\x00")
|
||
|
|
||
|
func assetsSourceStylesCssBytes() ([]byte, error) {
|
||
|
return bindataRead(
|
||
|
_assetsSourceStylesCss,
|
||
|
"assets/source/styles.css",
|
||
|
)
|
||
|
}
|
||
|
|
||
|
func assetsSourceStylesCss() (*asset, error) {
|
||
|
bytes, err := assetsSourceStylesCssBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "assets/source/styles.css", size: 1880, mode: os.FileMode(438), modTime: time.Unix(1465578069, 0)}
|
||
|
a := &asset{bytes: bytes, info: info}
|
||
|
return a, nil
|
||
|
}
|
||
|
|
||
|
var _assetsSourceTemplateTmpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xec\x5a\xdd\x6f\xe3\xb8\x11\x7f\x4e\x81\xfe\x0f\x3c\xdd\xe1\xce\x06\x56\x94\x48\x7d\x67\xe5\x14\x77\xbb\xd7\xed\x01\xfb\x71\xe8\x66\x1f\xda\x97\x03\x2d\xd1\xb6\x7a\xb2\xe4\x52\xb2\x13\x6f\x90\xff\xbd\x33\xa2\x64\xcb\x8e\x92\x38\xdd\xbd\xc5\x16\x28\x1c\x44\xa4\x34\x1c\xce\xfc\xe6\x8b\xa4\x14\x7f\xf3\xf2\xdd\x8b\xcb\x7f\xfc\xfa\x33\x59\xd4\xcb\xfc\xe2\xcf\x7f\x8a\xdb\xeb\x59\xbc\x90\x22\xc5\xc6\x59\x5c\x67\x75\x2e\x2f\x6e\x6e\xe8\x5b\xb1\x94\xb7\xb7\xb1\xa5\x6f\x34\xcf\x96\xb2\x16\xa4\x80\xfb\x13\x63\x93\xc9\xab\x55\xa9\x6a\x83\x24\x65\x51\xcb\xa2\x9e\x18\x57\x59\x5a\x2f\x26\xa9\xdc\x64\x89\x34\x9b\xce\x33\x92\x15\x59\x9d\x89\xdc\xac\x12\x91\xcb\x09\xa3\xb6\x01\x9c\x90\x17\x21\x71\x9e\x15\xbf\x13\x25\xf3\x89\x51\xd5\xdb\x5c\x56\x0b\x29\x81\xdd\x42\xc9\xd9\xc4\xb0\x7e\x9b\x65\xb9\x5c\x8a\x42\xcc\xa5\xfa\x2d\x83\x19\x54\x21\x72\x4b\x13\xd2\xa4\xaa\x90\x4f\xdc\x74\x1b\x86\xb1\xd5\xb5\xcf\x62\xab\x53\x26\x9e\x96\xe9\x56\x4b\x5e\x6d\xe6\x64\x23\x55\x95\x95\xc5\xc4\x60\x94\x19\xe4\x7a\x99\x17\xd5\xc4\x58\xd4\xf5\xea\xdc\xb2\xae\xae\xae\xe8\x95\x43\x4b\x35\xb7\xb8\x6d\xdb\x16\xd0\xb7\x24\xe7\xd7\x28\xe7\x10\x21\x8b\xa2\xc8\x6a\x9e\x82\xd4\x32\x9b\x2f\x00\x03\xdb\x20\x1a\x06\x6c\x35\x22\x4d\x8c\x55\x59\x01\x08\x65\x71\x4e\xc4\xb4\x2a\xf3\x75\x2d\x9f\x1b\x8d\x54\x67\x71\x2a\x67\x95\x6e\x9e\xc5\xdf\x98\x26\xf9\x6b\x99\xa7\x52\x11\xd3\xec\x6e\x02\x77\x29\xd4\x2b\x25\xd2\x0c\x30\x26\x59\x3a\x31\x66\x06\xd9\xf2\x89\xe1\xbb\x30\xc3\xbc\x7d\xf0\x01\x60\x06\x65\xd6\x95\x54\xef\x57\x22\x91\xef\x8a\x0f\x95\x04\x05\x80\x8e\xbb\x2e\x0d\xdd\x3d\xe9\xa5\x12\x45\x35\x2b\xd5\x72\x62\x2c\x45\xad\xb2\xeb\x11\x8d\x02\x87\x45\xc4\x86\x1f\x18\x88\x39\x1e\x31\xa9\x67\xfb\x11\x5c\x99\x43\xfd\x20\x1a\xc3\x8c\x6c\x62\xb8\xcc\xa3\x81\x07\x5c\xd9\x8e\x6b\x2b\x26\xe0\x5b\x97\x2b\x82\xff\xcc\xa4\xcc\x4b\x35\x31\xbe\x9d\x3a\x69\x3a\x4b\x0d\x52\xce\x66\x95\x6c\x90\xb1\x1e\xa0\xf6\xa3\x64\x4f\xca\x76\xa4\xb1\x75\x08\xc0\x03\xb0\x48\x0d\x8b\x17\x80\x0e\xfe\x69\xc8\x38\x21\xb5\x9d\x41\x64\x6a\x6c\xe6\xa2\x96\x23\xfb\x19\x6f\xd5\x77\x5c\x9f\xda\x9d\xfa\x8e\x4f\xb9\xff\x90\xfa\x30\xd5\xa9\xba\x3b\x7e\xf4\x14\xdd\xe7\xda\x0b\x1a\x4f\x31\x48\x3d\x24\xb4\xc9\x7d\x90\xd5\x07\xfb\x45\x0e\x75\xfc\xf1\x5e\xd0\x79\x7f\x40\x67\x7f\xdb\xf7\xed\xd6\x01\xba\x36\xf7\x5d\xca\x09\x0b\x6c\x1a\x39\xfb\xe1\xc3\xe3\x19\x75\x03\x27\x6c\xfd\xa7\x69\x9a\x1e\x07\xa8\x1c\x98\x1f\xe4\x38\x60\x70\x16\xaf\x44\xbd\x20\x10\xdc\x79\x67\x75\x50\x66\x19\x85\xd4\xe5\x2e\x71\x5c\x87\x06\x61\x62\x32\xb0\x21\x30\x34\xb9\x4d\x42\x1a\x71\xbc\x72\x7b\xe3\x86\xd4\x23\x0e\x50\x80\x7c\xcc\xf6\x40\xd4\x04\x66\x6c\x48\x91\x8a\x34\x54\xf0\xb7\xe0\x41\x44\x39\x4f\x5a\x2e\x70\xc7\x6c\x9f\x03\xa3\x0d\xf8\x74\x88\x93\xd8\x7a\x16\xb3\x9d\x40\xff\x2d\xe0\x66\x40\x19\x4f\xcc\x80\x7a\x6e\x10\x9a\x90\x2a\x42\xd7\x35\x23\x1a\x44\x5e\x68\xfa\xe0\xf3\xa1\x63\x32\x9b\x3a\x81\x87\xe3\x1d\xc6\x37\xa6\x47\x7d\xde\xf4\x3c\x9f\xdf\xcb\xd6\x61\x34\xe0\x1f\xf7\x7e\x00\x48\x28\x99\xd4\x44\x5d\x83\xcd\x39\x0d\x43\xf0\x2c\xb5\x6d\xda\x90\x57\xf6\x09\x85\xf3\x80\xf2\x70\x97\x55\x1c\x00\x14\xdd\x05\x28\x5d\x3b\x6a\x9a\xc0\xc0\x73\x01\x3e\x20\x6a\x61\x45\x87\xb2\x86\x21\x5f\xab\x7c\xf4\xad\x1c\x1f\xa1\xee\xfd\x1f\xf5\xd3\x51\x0f\x86\x51\x6f\x90\x9d\x8d\x7b\x73\xc5\xd6\x7c\x17\x77\xbb\xa6\x6e\xf5\x53\x3e\xd4\xb9\x87\x13\xbe\x78\x28\xcf\x24\x53\xfc\x9d\x9a\x6a\x66\x36\xfe\xf6\xd4\xd4\x71\x23\xee\x3c\x38\x44\x72\xfc\x7d\x62\x72\x4e\xdb\x9a\x15\xfa\x94\x61\x0a\xc5\xa2\x79\xae\x2b\xfd\xb7\xe2\xd1\x64\x8d\xd9\x97\x03\xee\xe1\x70\xb2\xee\xd2\x18\x0f\x21\x45\xeb\x2c\xe6\xb0\x26\xfd\xf8\x36\x38\x2f\x27\x6e\xe8\x51\xc6\xc6\x3a\xeb\x3b\xa1\xdd\x94\x7f\xe0\x19\xb8\xe0\xb1\xde\x5e\x9f\x01\xc1\x13\x2d\x38\x0f\x03\x1a\xb8\xff\x95\xe0\xcc\x8f\xa8\xfb\x70\xfd\x45\xc1\xf9\x5e\xf0\x60\x58\x70\x9f\x73\xea\x38\x9d\xe4\x8c\xfa\xee\x83\x92\x4f\xb5\xe4\x2e\x03\x4e\xee\x69\x10\x43\x51\x63\x8f\x40\x1c\x41\x8a\xd6\x92\x72\x58\xfd\x44\xf7\x40\xec\xd8\x10\x5a\x5a\x52\x1f\x90\x8b\x1e\xac\x94\xb3\xd9\xec\x64\xf7\x45\xd2\xe6\x4e\x09\xb2\x67\xf5\xb6\x59\x66\x3d\xb9\x74\x42\xc4\xdd\x5b\x3
|
||
|
|
||
|
func assetsSourceTemplateTmplBytes() ([]byte, error) {
|
||
|
return bindataRead(
|
||
|
_assetsSourceTemplateTmpl,
|
||
|
"assets/source/template.tmpl",
|
||
|
)
|
||
|
}
|
||
|
|
||
|
func assetsSourceTemplateTmpl() (*asset, error) {
|
||
|
bytes, err := assetsSourceTemplateTmplBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "assets/source/template.tmpl", size: 9012, mode: os.FileMode(438), modTime: time.Unix(1465578153, 0)}
|
||
|
a := &asset{bytes: bytes, info: info}
|
||
|
return a, nil
|
||
|
}
|
||
|
|
||
|
// Asset loads and returns the asset for the given name.
|
||
|
// It returns an error if the asset could not be found or
|
||
|
// could not be loaded.
|
||
|
func Asset(name string) ([]byte, error) {
|
||
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||
|
if f, ok := _bindata[cannonicalName]; ok {
|
||
|
a, err := f()
|
||
|
if err != nil {
|
||
|
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
|
||
|
}
|
||
|
return a.bytes, nil
|
||
|
}
|
||
|
return nil, fmt.Errorf("Asset %s not found", name)
|
||
|
}
|
||
|
|
||
|
// MustAsset is like Asset but panics when Asset would return an error.
|
||
|
// It simplifies safe initialization of global variables.
|
||
|
func MustAsset(name string) []byte {
|
||
|
a, err := Asset(name)
|
||
|
if err != nil {
|
||
|
panic("asset: Asset(" + name + "): " + err.Error())
|
||
|
}
|
||
|
|
||
|
return a
|
||
|
}
|
||
|
|
||
|
// AssetInfo loads and returns the asset info for the given name.
|
||
|
// It returns an error if the asset could not be found or
|
||
|
// could not be loaded.
|
||
|
func AssetInfo(name string) (os.FileInfo, error) {
|
||
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||
|
if f, ok := _bindata[cannonicalName]; ok {
|
||
|
a, err := f()
|
||
|
if err != nil {
|
||
|
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
|
||
|
}
|
||
|
return a.info, nil
|
||
|
}
|
||
|
return nil, fmt.Errorf("AssetInfo %s not found", name)
|
||
|
}
|
||
|
|
||
|
// AssetNames returns the names of the assets.
|
||
|
func AssetNames() []string {
|
||
|
names := make([]string, 0, len(_bindata))
|
||
|
for name := range _bindata {
|
||
|
names = append(names, name)
|
||
|
}
|
||
|
return names
|
||
|
}
|
||
|
|
||
|
// _bindata is a table, holding each asset generator, mapped to its name.
|
||
|
var _bindata = map[string]func() (*asset, error){
|
||
|
"assets/source/styles.css": assetsSourceStylesCss,
|
||
|
"assets/source/template.tmpl": assetsSourceTemplateTmpl,
|
||
|
}
|
||
|
|
||
|
// AssetDir returns the file names below a certain
|
||
|
// directory embedded in the file by go-bindata.
|
||
|
// For example if you run go-bindata on data/... and data contains the
|
||
|
// following hierarchy:
|
||
|
// data/
|
||
|
// foo.txt
|
||
|
// img/
|
||
|
// a.png
|
||
|
// b.png
|
||
|
// then AssetDir("data") would return []string{"foo.txt", "img"}
|
||
|
// AssetDir("data/img") would return []string{"a.png", "b.png"}
|
||
|
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
|
||
|
// AssetDir("") will return []string{"data"}.
|
||
|
func AssetDir(name string) ([]string, error) {
|
||
|
node := _bintree
|
||
|
if len(name) != 0 {
|
||
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||
|
pathList := strings.Split(cannonicalName, "/")
|
||
|
for _, p := range pathList {
|
||
|
node = node.Children[p]
|
||
|
if node == nil {
|
||
|
return nil, fmt.Errorf("Asset %s not found", name)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if node.Func != nil {
|
||
|
return nil, fmt.Errorf("Asset %s not found", name)
|
||
|
}
|
||
|
rv := make([]string, 0, len(node.Children))
|
||
|
for childName := range node.Children {
|
||
|
rv = append(rv, childName)
|
||
|
}
|
||
|
return rv, nil
|
||
|
}
|
||
|
|
||
|
type bintree struct {
|
||
|
Func func() (*asset, error)
|
||
|
Children map[string]*bintree
|
||
|
}
|
||
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||
|
"assets": &bintree{nil, map[string]*bintree{
|
||
|
"source": &bintree{nil, map[string]*bintree{
|
||
|
"styles.css": &bintree{assetsSourceStylesCss, map[string]*bintree{}},
|
||
|
"template.tmpl": &bintree{assetsSourceTemplateTmpl, map[string]*bintree{}},
|
||
|
}},
|
||
|
}},
|
||
|
}}
|
||
|
|
||
|
// RestoreAsset restores an asset under the given directory
|
||
|
func RestoreAsset(dir, name string) error {
|
||
|
data, err := Asset(name)
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
info, err := AssetInfo(name)
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// RestoreAssets restores an asset under the given directory recursively
|
||
|
func RestoreAssets(dir, name string) error {
|
||
|
children, err := AssetDir(name)
|
||
|
// File
|
||
|
if err != nil {
|
||
|
return RestoreAsset(dir, name)
|
||
|
}
|
||
|
// Dir
|
||
|
for _, child := range children {
|
||
|
err = RestoreAssets(dir, filepath.Join(name, child))
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func _filePath(dir, name string) string {
|
||
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||
|
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
||
|
}
|
||
|
|