func (f *FileSystem) Join(elem ...string) string {
	return filepath.Join(elem...)
}
Join implements the FileSystem Join method,
package tarfs
import (
	"archive/tar"
	"io"
	"os"
	"path/filepath"
	"sort"
	"strings"
)
func NewFS(path string) (*FileSystem, error) {
	fs := &FileSystem{}
	f, err := NewFile(path)
	if err != nil {
		return nil, err
	}
	defer f.Close()
	fs.createIndex(f.Reader)
	return fs, nil
}
type FileSystem struct {
	index *node
}
func (f *FileSystem) ReadDir(dirname string) ([]os.FileInfo, error) {
	cursor, err := f.findNode(dirname)
	if err != nil {
		return nil, err
	}
	if !cursor.IsDir() {
		return nil, os.ErrInvalid
	}
	content := make([]os.FileInfo, len(cursor.next))
	i := 0
	for _, f := range cursor.next {
		content[i] = f
		i++
	}
	sort.Slice(content, func(i, j int) bool { return content[i].Name() < content[j].Name() })
	return content, nil
}
func (f *FileSystem) Lstat(name string) (os.FileInfo, error) {
	cursor, err := f.findNode(name)
	if err != nil {
		return nil, err
	}
	return cursor, nil
}