Versions in this module Expand all Collapse all v2 v2.0.6 Jun 10, 2022 Changes in this version + const DefaultName + const Separator + func Add(content string, prefix ...string) error + func Contains(path string) bool + func Dump() + func Export(src, dst string, option ...ExportOption) error + func GetContent(path string) []byte + func IsEmpty() bool + func Load(path string, prefix ...string) error + func Pack(srcPaths string, keyPrefix ...string) ([]byte, error) + func PackToFile(srcPaths, dstPath string, keyPrefix ...string) error + func PackToGoFile(srcPath, goFilePath, pkgName string, keyPrefix ...string) error + type ExportOption struct + RemovePrefix string + type File struct + func Get(path string) *File + func GetWithIndex(path string, indexFiles []string) *File + func ScanDir(path string, pattern string, recursive ...bool) []*File + func ScanDirFile(path string, pattern string, recursive ...bool) []*File + func Unpack(path string) ([]*File, error) + func UnpackContent(content string) ([]*File, error) + func (f *File) Close() error + func (f *File) Content() []byte + func (f *File) FileInfo() os.FileInfo + func (f *File) Name() string + func (f *File) Open() (io.ReadCloser, error) + func (f *File) Read(b []byte) (n int, err error) + func (f *File) Readdir(count int) ([]os.FileInfo, error) + func (f *File) Seek(offset int64, whence int) (n int64, err error) + func (f *File) Stat() (os.FileInfo, error) + func (f File) MarshalJSON() ([]byte, error) + type Resource struct + func Instance(name ...string) *Resource + func New() *Resource + func (r *Resource) Add(content string, prefix ...string) error + func (r *Resource) Contains(path string) bool + func (r *Resource) Dump() + func (r *Resource) Export(src, dst string, option ...ExportOption) error + func (r *Resource) Get(path string) *File + func (r *Resource) GetContent(path string) []byte + func (r *Resource) GetWithIndex(path string, indexFiles []string) *File + func (r *Resource) IsEmpty() bool + func (r *Resource) Load(path string, prefix ...string) error + func (r *Resource) ScanDir(path string, pattern string, recursive ...bool) []*File + func (r *Resource) ScanDirFile(path string, pattern string, recursive ...bool) []*File v2.0.6-1 Jun 11, 2022