MCPcopy Index your code
hub / github.com/GoEdgeLab/EdgeNode / OpenFileReader

Method OpenFileReader

internal/utils/bfs/fs.go:107–117  ·  view source on GitHub ↗

OpenFileReader 打开文件读取器

(hash string, isPartial bool)

Source from the content-addressed store, hash-verified

105
106// OpenFileReader 打开文件读取器
107func (this *FS) OpenFileReader(hash string, isPartial bool) (*FileReader, error) {
108 if this.isClosed {
109 return nil, errors.New("the fs closed")
110 }
111
112 bFile, err := this.openBFileForHashReading(hash)
113 if err != nil {
114 return nil, err
115 }
116 return bFile.OpenFileReader(hash, isPartial)
117}
118
119func (this *FS) ExistFile(hash string) (bool, error) {
120 if this.isClosed {

Callers 7

TestFS_OpenFileReaderFunction · 0.45
TestFileReader_ReadAtFunction · 0.45
TestFileReader_PoolFunction · 0.45
TestBlocksFile_CanCloseFunction · 0.45

Calls 1

Tested by 7

TestFS_OpenFileReaderFunction · 0.36
TestFileReader_ReadAtFunction · 0.36
TestFileReader_PoolFunction · 0.36
TestBlocksFile_CanCloseFunction · 0.36