mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-05 00:47:51 -05:00
27 lines
693 B
Go
27 lines
693 B
Go
|
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"
|
||
|
)
|
||
|
|
||
|
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{}
|
||
|
}
|