@@ -2148,48 +2148,6 @@ static public int calcFolderSize(File folder) {
21482148 return size ;
21492149 }
21502150
2151-
2152- /**
2153- * Recursively creates a list of all files within the specified folder,
2154- * and returns a list of their relative paths.
2155- * Ignores any files/folders prefixed with a dot.
2156- */
2157- static public String [] listFiles (String path , boolean relative ) {
2158- return listFiles (new File (path ), relative );
2159- }
2160-
2161-
2162- static public String [] listFiles (File folder , boolean relative ) {
2163- String path = folder .getAbsolutePath ();
2164- Vector <String > vector = new Vector <String >();
2165- listFiles (relative ? (path + File .separator ) : "" , path , vector );
2166- String outgoing [] = new String [vector .size ()];
2167- vector .copyInto (outgoing );
2168- return outgoing ;
2169- }
2170-
2171-
2172- static protected void listFiles (String basePath ,
2173- String path , Vector <String > vector ) {
2174- File folder = new File (path );
2175- String list [] = folder .list ();
2176- if (list == null ) return ;
2177-
2178- for (int i = 0 ; i < list .length ; i ++) {
2179- if (list [i ].charAt (0 ) == '.' ) continue ;
2180-
2181- File file = new File (path , list [i ]);
2182- String newPath = file .getAbsolutePath ();
2183- if (newPath .startsWith (basePath )) {
2184- newPath = newPath .substring (basePath .length ());
2185- }
2186- vector .add (newPath );
2187- if (file .isDirectory ()) {
2188- listFiles (basePath , newPath , vector );
2189- }
2190- }
2191- }
2192-
21932151 public void handleAddLibrary () {
21942152 JFileChooser fileChooser = new JFileChooser (System .getProperty ("user.home" ));
21952153 fileChooser .setDialogTitle (tr ("Select a zip file or a folder containing the library you'd like to add" ));
0 commit comments