Loads native library using the given path and name of the library.

@param path Path of the native library.
@param name Name  of the native library.
@return True for successfully loading; false otherwise.
498963
private static boolean loadNativeLibrary(String path, String name) {
        File libPath = new File(path, name);
        if(libPath.exists()) {

            try {
                System.load(new File(path, name).getAbsolutePath());
                return true;
            }
            catch(UnsatisfiedLinkError e) {
                System.err.println("Failed to load native library:" + name + ". osinfo: " + OSInfo.getNativeLibFolderPathForCurrentOS());
                System.err.println(e);
                return false;
            }

        }
        else {
            return false;
        }
    }
1011417
public static List<String> get(String name, @Nullable Path path) {
    return Args.path(name, path);
  }
303153
private static List<String> load(String path) {
        List<String> result = new ArrayList<>();
        try{
            InputStream in = null;
            LOGGER.info("加载资源："+path);
            if(path.startsWith("classpath:")){
                in = AutoDetector.class.getClassLoader().getResourceAsStream(path.replace("classpath:", ""));
            }else{
                in = new FileInputStream(path);
            }
            try(BufferedReader reader = new BufferedReader(new InputStreamReader(in,"utf-8"))){
                String line;
                while((line = reader.readLine()) != null){
                    line = line.trim();
                    if("".equals(line) || line.startsWith("#")){
                        continue;
                    }
                    result.add(line);
                }
            }
        }catch(Exception e){
            LOGGER.error("加载资源失败："+path, e);
        }
        return result;
    }
289481
public boolean contains(String path) {
        boolean result = false;
        FileName fn = new FileName(path);
        if (fn.getPath().startsWith(getPath())) {
            result = true;
        }
        return result;
    }
642215
public boolean containsResource (String path)
    {
        try {
            if (resolveJarFile()) {
                return false;
            }
            return (_jarSource.getJarEntry(path) != null);
        } catch (IOException ioe) {
            return false;
        }
    }
442458
public boolean load(String path, V[] value)
    {
        byte[] bytes = IOUtil.readBytes(path);
        if (bytes == null) return false;
        _ValueArray valueArray = new _ValueArray(value);
        ByteArray byteArray = new ByteArray(bytes);
        for (int i = 0; i < child.length; ++i)
        {
            int flag = byteArray.nextInt();
            if (flag == 1)
            {
                child[i] = new Node<V>();
                child[i].walkToLoad(byteArray, valueArray);
            }
        }
        size = value.length;

        return true;
    }
88550
private static void readClasspath(Properties props, String path) {
        if ((path != null) && !path.isEmpty()) {
            InputStream is = null;
            Properties result = new Properties();

            try {
                is = SystemConfiguration.class.getResourceAsStream(path);
                result.load(is);
                props.putAll(result);
            } catch (IOException ex) {
                throw new SystemException(ex);
            } finally {
                if (is != null) {
                    try {
                        is.close();
                    } catch (IOException ex) {
                        assert false : "This should never occur.";
                    }
                }
            }
        }
    }
889845
protected void checkPath(Path path) {
    URI thisUri = this.getUri();
    URI thatUri = path.toUri();
    String thatAuthority = thatUri.getAuthority();
    if (thatUri.getScheme() != null
        && thatUri.getScheme().equalsIgnoreCase(thisUri.getScheme())
        && thatUri.getPort() == NameNode.DEFAULT_PORT
        && thisUri.getPort() == -1
        && thatAuthority.substring(0,thatAuthority.indexOf(":"))
        .equalsIgnoreCase(thisUri.getAuthority()))
      return;
    super.checkPath(path);
  }
373589
private static Environment loadClasspath(@NonNull String classpath) {
        var path = classpath;
        if (classpath.startsWith(HttpConst.SLASH)) {
            path = classpath.substring(1);
        }
        InputStream is = getDefault().getResourceAsStream(path);
        if (null == is) {
            return EMPTY_ENV;
        }
        return of(is);
    }
1246017
private Throwable loadFromStream(String _fileNameWithPath, InputStream _libAsStream) {
        String fileExt = getFileExtension(_fileNameWithPath);
        String prefix = _fileNameWithPath.replace(new File(_fileNameWithPath).getParent(), "").replace("." + fileExt, "");

        // extract the library
        try {
            File tmpFile = extractToTemp(_libAsStream, prefix, fileExt);
            Throwable loadLibErr = loadLib(tmpFile.getAbsolutePath());
            if (loadLibErr != null) {
                return loadLibErr;
            }
        } catch (Exception _ex) {
            return _ex;
        }

        return null;
    }
1138660
private InputStream getResourceInputStream(String path) {
		InputStream is = config.getContext().getResourceAsStream(path);
		if (is == null) {
			try {
				is = ClassLoaderResourceUtils.getResourceAsStream(path, this);
			} catch (FileNotFoundException e) {
				throw new BundlingProcessException(e);
			}
		}

		return is;
	}
832159
protected boolean validClassFilePath(String path)
	{
		if(path==null)
		{
			return false;
		}
		File file=new File(path);
		return file.exists()&&file.isFile();
	}
68899
@ConfigArg(0)
  public void setPath(PathImpl path)
  {
    if (path.getPath().endsWith(".jar")
        || path.getPath().endsWith(".zip")) {
      path = JarPath.create(path);
    }

    _path = path;
  }
1012911
public Template load(String path) throws IOException, ParseException {
  	
    try(TemplateSource source = sourceLoader.find(path)) {
      
      if (source != null) {
        
        return load(path, source);
      }
      
  	}
    
    return null;
  }
304233
private static InputStream getResourceAsStream(String path) throws IOException {
    if (StringUtils.isEmpty(path)) {
      return null;
    }

    // first try to load as file
    File file = new File(path);
    if (file.exists() && file.isFile()) {
      return new FileInputStream(file);
    }

    // if not a file fallback to classloader resource
    return CertificateLoader.class.getResourceAsStream(path);
  }
416282
public Class loadClass(String name)
    {
        try
        {
            return classLoader.loadClass( name );
        }
        catch (ClassNotFoundException notFound)
        {
            return null;
        }
        catch (NoClassDefFoundError notFound)
        {
            return null;
        }
    }
442856
public static HttpFileBuilder ofResource(String path) {
        requireNonNull(path, "path");
        return ofResource(HttpFile.class.getClassLoader(), path);
    }