func (m *memoryFS) Attributes(ctx context.Context, path string, options *ReaderOptions) (*Attributes, error) {
	m.RLock()
	f, ok := m.data[path]
	m.RUnlock()
	if ok {
		attrs := f.attrs
		return &attrs, nil
	}
	return nil, &notExistError{
		Path: path,
	}
}
Attributes implements FS.
package storage
import (
	"bytes"
	"context"
	"io"
	"io/ioutil"
	"strings"
	"sync"
	"time"
)
func NewMemoryFS() FS {
	return &memoryFS{
		data: make(map[string]*memFile),
	}
}
type memFile struct {
	data  []byte
	attrs Attributes
}
func (f *memFile) readCloser() io.ReadCloser {
	return ioutil.NopCloser(bytes.NewReader(f.data))
}
type memoryFS struct {
	sync.RWMutex
	data map[string]*memFile
}
func (m *memoryFS) Open(_ context.Context, path string, options *ReaderOptions) (*File, error) {
	m.RLock()
	f, ok := m.data[path]
	m.RUnlock()
	if ok {
		return &File{
			ReadCloser: f.readCloser(),
			Attributes: f.attrs,
		}, nil
	}
	return nil, &notExistError{
		Path: path,
	}
}