github.com/imannamdari/v2ray-core/v5@v5.0.5/common/environment/envimpl/fs.go (about)

     1  package envimpl
     2  
     3  import (
     4  	"github.com/imannamdari/v2ray-core/v5/common/environment"
     5  	"github.com/imannamdari/v2ray-core/v5/common/platform/filesystem"
     6  	"github.com/imannamdari/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  }