func NewLocalFileEntryFactory() FileEntryFactory {
	return &localFileEntryFactory{}
}
NewLocalFileEntryFactory is the constructor for localFileEntryFactory.
package base
import (
	"bytes"
	"errors"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"sync"
	"github.com/uber/makisu/lib/storage/metadata"
	"github.com/uber/makisu/lib/utils/stringset"
)
var (
	ErrFilePersisted = errors.New("file is persisted")
)
type FileState struct {
	directory string
}
func NewFileState(directory string) FileState {
	return FileState{directory}
}
func (s FileState) GetDirectory() string {
	return s.directory
}
type FileEntryFactory interface {
	Create(name string, state FileState) FileEntry
	GetRelativePath(name string) string
}
type FileEntry interface {
	GetState() FileState
	GetName() string
	GetPath() string
	GetStat() (os.FileInfo, error)
	Create(targetState FileState, len int64) error
	Reload() error
	MoveFrom(targetState FileState, sourcePath string) error
	Move(targetState FileState) error
	LinkTo(targetPath string) error
	Delete() error
	GetReader() (FileReader, error)
	GetReadWriter() (FileReadWriter, error)
	AddMetadata(md metadata.Metadata) error
	GetMetadata(md metadata.Metadata) error
	SetMetadata(md metadata.Metadata) (bool, error)
	SetMetadataAt(md metadata.Metadata, b []byte, offset int64) (updated bool, err error)
	GetOrSetMetadata(md metadata.Metadata) error
	DeleteMetadata(md metadata.Metadata) error
	RangeMetadata(f func(md metadata.Metadata) error) error
}
var _ FileEntryFactory = (*localFileEntryFactory)(nil)
var _ FileEntryFactory = (*casFileEntryFactory)(nil)
var _ FileEntry = (*localFileEntry)(nil)
type localFileEntryFactory struct{}