mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-30 05:56:54 -05:00
added filesystem default implementation
This commit is contained in:
parent
70c66853f9
commit
08b841aee1
26
common/environment/envimpl/fs.go
Normal file
26
common/environment/envimpl/fs.go
Normal file
@ -0,0 +1,26 @@
|
||||
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{}
|
||||
}
|
Loading…
Reference in New Issue
Block a user