public static File getFileByPath()

in src/main/java/com/aliyuncs/kms/secretsmanager/client/utils/ConfigUtils.java [37:53]


    public static File getFileByPath(String filePath) {
        File file = new File(filePath);
        if (!file.exists()) {
            URL resource = ConfigUtils.class.getClassLoader().getResource("");
            String path = "";
            if(resource != null){
                path = resource.getPath();
            }
            if (!(file = new File(path + filePath)).exists()) {
                path = Paths.get(filePath).toAbsolutePath().toString();
                if (!(file = new File(path)).exists()) {
                    return null;
                }
            }
        }
        return file;
    }