1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-18 10:26:01 -05:00
v2fly/common/environment/envimpl/fs.go

26 lines
691 B
Go
Raw Normal View History

package envimpl
import (
"github.com/v2fly/v2ray-core/v4/common/environment"
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem/fsifce"
)
2021-11-27 01:32:07 -05:00
type fileSystemDefaultImpl struct{}
func (f fileSystemDefaultImpl) OpenFileForReadSeek() fsifce.FileSeekerFunc {
return filesystem.NewFileSeeker
}
func (f fileSystemDefaultImpl) OpenFileForRead() fsifce.FileReaderFunc {
return filesystem.NewFileReader
}
func (f fileSystemDefaultImpl) OpenFileForWrite() fsifce.FileWriterFunc {
return filesystem.NewFileWriter
}
func NewDefaultFileSystemDefaultImpl() environment.FileSystemCapabilitySet {
return fileSystemDefaultImpl{}
}