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

 

相关文章:

  • 2021-06-28
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
  • 2022-02-05
  • 2022-02-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案