github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/common/environment/envimpl/fs.go (about) 1 package envimpl 2 3 import ( 4 "github.com/v2fly/v2ray-core/v5/common/environment" 5 "github.com/v2fly/v2ray-core/v5/common/platform/filesystem" 6 "github.com/v2fly/v2ray-core/v5/common/platform/filesystem/fsifce" 7 ) 8 9 type fileSystemDefaultImpl struct{} 10 11 func (f fileSystemDefaultImpl) OpenFileForReadSeek() fsifce.FileSeekerFunc { 12 return filesystem.NewFileSeeker 13 } 14 15 func (f fileSystemDefaultImpl) OpenFileForRead() fsifce.FileReaderFunc { 16 return filesystem.NewFileReader 17 } 18 19 func (f fileSystemDefaultImpl) OpenFileForWrite() fsifce.FileWriterFunc { 20 return filesystem.NewFileWriter 21 } 22 23 func NewDefaultFileSystemDefaultImpl() environment.FileSystemCapabilitySet { 24 return fileSystemDefaultImpl{} 25 }