func (f *fs) Chmod(name string, mode os.FileMode) error {
	p, err := f.strip(name)
	if err != nil {
		return err
	}
	return f.backend.Chmod(p, mode)
}
Chmod changes the mode of the named file to mode.
package stripprefix
import (
	"os"
	"path/filepath"
	"strings"
	"time"
	"github.com/spf13/afero"
)
type fs struct {
	prefix  string
	backend afero.Fs
}
func New(prefix string, backend afero.Fs) afero.Fs {
	return &fs{
		prefix:  prefix,
		backend: backend,
	}
}
func (f *fs) strip(name string) (string, error) {
	if !filepath.IsAbs(name) {
		return name, nil
	}
	p := strings.TrimPrefix(name, f.prefix)
	if len(p) == len(name) {
		return "", os.ErrNotExist
	}
	if p == "" {
		return ".", nil
	}
	return p, nil
}
func (f *fs) Create(name string) (afero.File, error) {
	p, err := f.strip(name)
	if err != nil {
		return nil, err
	}
	return f.backend.Create(p)
}
func (f *fs) Mkdir(name string, perm os.FileMode) error {
	p, err := f.strip(name)
	if err != nil {
		return err
	}
	return f.backend.Mkdir(p, perm)
}
func (f *fs) MkdirAll(path string, perm os.FileMode) error {
	p, err := f.strip(path)
	if err != nil {
		return err
	}
	return f.backend.MkdirAll(p, perm)
}
func (f *fs) Open(name string) (afero.File, error) {
	p, err := f.strip(name)
	if err != nil {
		return nil, err
	}
	return f.backend.Open(p)
}
func (f *fs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error) {
	p, err := f.strip(name)
	if err != nil {
		return nil, err
	}
	return f.backend.OpenFile(p, flag, perm)
}
func (f *fs) Remove(name string) error {
	p, err := f.strip(name)
	if err != nil {
		return err
	}
	return f.backend.Remove(p)
}
func (f *fs) RemoveAll(path string) error {
	p, err := f.strip(path)
	if err != nil {
		return err
	}
	return f.backend.RemoveAll(p)
}
func (f *fs) Rename(oldname string, newname string) error {
	p1, err := f.strip(oldname)
	if err != nil {
		return err
	}
	p2, err := f.strip(newname)
	if err != nil {
		return err
	}
	return f.backend.Rename(p1, p2)
}
func (f *fs) Stat(name string) (os.FileInfo, error) {
	p, err := f.strip(name)
	if err != nil {
		return nil, err
	}
	return f.backend.Stat(p)
}
func (f *fs) Name() string {
	return "stripprefix"
}