2021-09-05 10:02:31 -04:00
|
|
|
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{}
|
2021-09-05 10:02:31 -04:00
|
|
|
|
|
|
|
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{}
|
|
|
|
}
|