1
0
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:
Shelikhoo 2021-09-05 15:02:31 +01:00
parent 70c66853f9
commit 08b841aee1
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

View 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{}
}