OpenFileReader 打开文件读取器
(hash string, isPartial bool)
| 105 | |
| 106 | // OpenFileReader 打开文件读取器 |
| 107 | func (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 | |
| 119 | func (this *FS) ExistFile(hash string) (bool, error) { |
| 120 | if this.isClosed { |