func NewFakeFilesystemWithFiles(fs []FakeFile) FakeFilesystem {
	fileMap := make(map[string]FakeFile)
	for _, f := range fs {
		fileMap[f.Name] = f
	}
	return FakeFilesystem{files: fileMap}
}
NewFakeFilesystemWithFiles creates a new FakeFilesystem
instance bundled with a list of FakeFile instances that
can be passed.
package fs
import (
	"bytes"
	"errors"
	"os"
	"time"
)
var (
	ErrFileOperationNotPermitted = errors.New("fake file does not exist and therefore this operation is not permitted.")
	ErrFileDoesNotExist          = errors.New("fake file does not exist")
)
type FakeFilesystem struct {
	files map[string]FakeFile
}