(path string)
| 554 | } |
| 555 | |
| 556 | func (d *Alias) ResolveLinkCacheMode(path string) driver.LinkCacheMode { |
| 557 | roots, sub := d.getRootsAndPath(path) |
| 558 | if len(roots) == 0 { |
| 559 | return 0 |
| 560 | } |
| 561 | for _, root := range roots { |
| 562 | storage, actualPath, err := op.GetStorageAndActualPath(stdpath.Join(root, sub)) |
| 563 | if err != nil { |
| 564 | continue |
| 565 | } |
| 566 | if storage.Config().CheckStatus && storage.GetStorage().Status != op.WORK { |
| 567 | continue |
| 568 | } |
| 569 | mode := storage.Config().LinkCacheMode |
| 570 | if mode == -1 { |
| 571 | return storage.(driver.LinkCacheModeResolver).ResolveLinkCacheMode(actualPath) |
| 572 | } else { |
| 573 | return mode |
| 574 | } |
| 575 | } |
| 576 | return 0 |
| 577 | } |
| 578 | |
| 579 | var _ driver.Driver = (*Alias)(nil) |
nothing calls this directly
no test coverage detected