MCPcopy Create free account
hub / github.com/facebook/SoLoader / getLibraryPath

Method getLibraryPath

java/com/facebook/soloader/SoLoader.java:719–735  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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();

Callers 1

getLibraryPathMethod · 0.95

Calls 2

getLibraryPathMethod · 0.95
lockMethod · 0.80

Tested by

no test coverage detected