1 public static Vector GetVideoFileName(String fileAbsolutePath) { 2 Vector vecFile = new Vector(); 3 File file = new File(fileAbsolutePath); 4 File[] subFile = file.listFiles(); 5 6 for (int iFileLength = 0; iFileLength < subFile.length; iFileLength++) { 7 // 判断是否为文件夹 8 if (!subFile[iFileLength].isDirectory()) { 9 String filename = subFile[iFileLength].getName(); 10 // 判断是否为apk结尾 11 if (filename.trim().toLowerCase().endsWith(".apk")) { 12 vecFile.add(filename); 13 } 14 } 15 } 16 return vecFile; 17 }