func (f *File) Open(path string) error {
	path = cleanPath(path)
	if path == "" {
		return os.ErrInvalid
	}
	f.reset()
	for {
		h, err := f.Next()
		if err == io.EOF {
			break
		}
		if err != nil {
			return err
		}
		if cleanPath(h.Name) == path {
			if h.FileInfo().IsDir() {
				return os.ErrInvalid
			}
			return nil
		}
	}
	return os.ErrNotExist
}
Open opens a file inside the tar reader. If the returned error
is a nil, the next Read call will read the requested file inside
the tar file.
package tarfs
import (
	"archive/tar"
	"compress/gzip"
	"io"
	"os"
	"path/filepath"
	"strings"
)
type File struct {
	*tar.Reader
	f *os.File
	z *gzip.Reader
}
func NewFile(path string) (*File, error) {
	f := &File{}
	var err error
	f.f, err = os.Open(path)
	if err != nil {
		return nil, err
	}
	f.reset()
	return f, nil
}
func (f *File) Close() error {
	if f.z != nil {
		f.z.Close()
	}
	return f.f.Close()
}