public static String getResourcePath(String name) throws IOException { if (self == null) { return name; } if (LSystem.base().type() == LGame.Type.ANDROID) { if (name.toLowerCase().startsWith("assets/")) { name = StringUtils.replaceIgnoreCase(name, "assets/", ""); } if (name.startsWith("/") || name.startsWith("\\")) { name = name.substring(1, name.length()); } } File file = new File(self.getFilesDir(), name); if (!file.exists()) { retrieveFromAssets(self, name); } return file.getAbsolutePath(); }