GetPluginForFsType returns the appropriate plugin for the filesystem type. Returns nil if no plugin can handle the filesystem type.
(fsType string)
| 101 | // GetPluginForFsType returns the appropriate plugin for the filesystem type. |
| 102 | // Returns nil if no plugin can handle the filesystem type. |
| 103 | func GetPluginForFsType(fsType string) FsPlugin { |
| 104 | pluginsLock.RLock() |
| 105 | defer pluginsLock.RUnlock() |
| 106 | |
| 107 | var best FsPlugin |
| 108 | for _, p := range plugins { |
| 109 | if p.CanHandle(fsType) { |
| 110 | if best == nil || p.Priority() > best.Priority() { |
| 111 | best = p |
| 112 | } |
| 113 | } |
| 114 | } |
| 115 | return best |
| 116 | } |
no test coverage detected
searching dependent graphs…