@@ -2116,48 +2116,6 @@ static public int calcFolderSize(File folder) {
2116
2116
return size ;
2117
2117
}
2118
2118
2119
-
2120
- /**
2121
- * Recursively creates a list of all files within the specified folder,
2122
- * and returns a list of their relative paths.
2123
- * Ignores any files/folders prefixed with a dot.
2124
- */
2125
- static public String [] listFiles (String path , boolean relative ) {
2126
- return listFiles (new File (path ), relative );
2127
- }
2128
-
2129
-
2130
- static public String [] listFiles (File folder , boolean relative ) {
2131
- String path = folder .getAbsolutePath ();
2132
- Vector <String > vector = new Vector <String >();
2133
- listFiles (relative ? (path + File .separator ) : "" , path , vector );
2134
- String outgoing [] = new String [vector .size ()];
2135
- vector .copyInto (outgoing );
2136
- return outgoing ;
2137
- }
2138
-
2139
-
2140
- static protected void listFiles (String basePath ,
2141
- String path , Vector <String > vector ) {
2142
- File folder = new File (path );
2143
- String list [] = folder .list ();
2144
- if (list == null ) return ;
2145
-
2146
- for (int i = 0 ; i < list .length ; i ++) {
2147
- if (list [i ].charAt (0 ) == '.' ) continue ;
2148
-
2149
- File file = new File (path , list [i ]);
2150
- String newPath = file .getAbsolutePath ();
2151
- if (newPath .startsWith (basePath )) {
2152
- newPath = newPath .substring (basePath .length ());
2153
- }
2154
- vector .add (newPath );
2155
- if (file .isDirectory ()) {
2156
- listFiles (basePath , newPath , vector );
2157
- }
2158
- }
2159
- }
2160
-
2161
2119
public void handleAddLibrary () {
2162
2120
JFileChooser fileChooser = new JFileChooser (System .getProperty ("user.home" ));
2163
2121
fileChooser .setDialogTitle (tr ("Select a zip file or a folder containing the library you'd like to add" ));
0 commit comments