(f fs.Fs)
| 1304 | } |
| 1305 | |
| 1306 | func (r *run) getCacheFs(f fs.Fs) (*cache.Fs, error) { |
| 1307 | cfs, ok := f.(*cache.Fs) |
| 1308 | if ok { |
| 1309 | return cfs, nil |
| 1310 | } |
| 1311 | if f.Features().UnWrap != nil { |
| 1312 | cfs, ok := f.Features().UnWrap().(*cache.Fs) |
| 1313 | if ok { |
| 1314 | return cfs, nil |
| 1315 | } |
| 1316 | } |
| 1317 | return nil, errors.New("didn't found a cache fs") |
| 1318 | } |
| 1319 | |
| 1320 | func randStringBytes(n int) []byte { |
| 1321 | b := make([]byte, n) |
no test coverage detected