(File file)
| 945 | |
| 946 | File[] copyItems = folder.listFiles(new FileFilter() { |
| 947 | public boolean accept(File file) { |
| 948 | String name = file.getName(); |
| 949 | // just in case the OS likes to return these as if they're legit |
| 950 | if (name.equals(".") || name.equals("..")) { |
| 951 | return false; |
| 952 | } |
| 953 | // list of files/folders to be ignored during "save as" |
| 954 | String[] ignorable = mode.getIgnorable(); |
| 955 | if (ignorable != null) { |
| 956 | for (String ignore : ignorable) { |
| 957 | if (name.equals(ignore)) { |
| 958 | return false; |
| 959 | } |
| 960 | } |
| 961 | } |
| 962 | // ignore the extensions for code, since that'll be copied below |
| 963 | for (String ext : mode.getExtensions()) { |
| 964 | if (name.endsWith(ext)) { |
| 965 | return false; |
| 966 | } |
| 967 | } |
| 968 | // don't do screen captures, since there might be thousands. kind of |
| 969 | // a hack, but seems harmless. hm, where have i heard that before... |
| 970 | if (name.startsWith("screen-")) { |
| 971 | return false; |
| 972 | } |
| 973 | return true; |
| 974 | } |
| 975 | }); |
| 976 | |
| 977 | startSaveAsThread(oldName, newName, newFolder, copyItems); |
nothing calls this directly
no test coverage detected