1 package de.uni_hamburg.eggink.autojar; 2 3 19 20 import java.io.*; 21 import java.util.*; 22 23 28 29 public class FileExpand 30 { 31 private FileExpand() 32 { } 33 34 36 42 43 static public String [] getList(File basedir, String expr) 44 { 45 try 46 { 47 File exprFile = new File(expr), 48 dir = new File(basedir, expr); 49 50 dir = dir.getAbsoluteFile().getParentFile(); 51 52 if (! dir.exists()) 53 return null; 54 55 String [] names = dir.list(new OSFilter(exprFile.getName())); 56 String base = exprFile.getParent(); 58 if (base != null) 59 { 60 base += File.separator; 61 62 for (int i = 0; i < names.length; ++i) 63 names[i] = base + names[i]; 64 } 65 66 return names; 67 } 68 catch (Exception ex) 69 { 70 System.err.println(ex); 71 return null; 72 } 73 } 74 } 75 | Popular Tags |