Gets the full path of a library. @param libName the library file name, including the prefix and extension. @return the full path of the library, or null if it is not found in none of the SoSources. @throws IOException if there is an error calculating the canonical path of libName
(String libName)
| 717 | * @throws IOException if there is an error calculating the canonical path of libName |
| 718 | */ |
| 719 | public static @Nullable String getLibraryPath(String libName) throws IOException { |
| 720 | String libPath = null; |
| 721 | |
| 722 | sSoSourcesLock.readLock().lock(); |
| 723 | try { |
| 724 | if (sSoSources != null) { |
| 725 | for (int i = 0; libPath == null && i < sSoSources.length; ++i) { |
| 726 | SoSource currentSource = sSoSources[i]; |
| 727 | libPath = currentSource.getLibraryPath(libName); |
| 728 | } |
| 729 | } |
| 730 | } finally { |
| 731 | sSoSourcesLock.readLock().unlock(); |
| 732 | } |
| 733 | |
| 734 | return libPath; |
| 735 | } |
| 736 | |
| 737 | public static SoSource[] cloneSoSources() { |
| 738 | sSoSourcesLock.readLock().lock(); |
no test coverage detected