1 | if (myfile.isDirectory()) {↵ | | 1 | if (myfile.isDirectory()) {↵
|
2 | if (isIncluded(currentelement)↵ | | 2 | if (isIncluded(currentelement)↵
|
3 | && currentelement.length() > 0) {↵ | | 3 | && currentelement.length() > 0) {↵
|
4 | accountForIncludedDir(currentelement, myfile, true);↵ | | 4 | accountForIncludedDir(currentelement, myfile, true);↵
|
5 | } else {↵ | | 5 | } else {↵
|
6 | if (currentelement.length() > 0) {↵ | | 6 | if (currentelement.length() > 0) {↵
|
7 | if (currentelement.charAt(currentelement↵ | | 7 | if (currentelement.charAt(currentelement↵
|
8 | .length() - 1)↵ | | 8 | .length() - 1)↵
|
9 | != File.separatorChar) {↵ | | 9 | != File.separatorChar) {↵
|
10 | currentelement =↵ | | 10 | currentelement =↵
|
11 | currentelement + File.separatorChar;↵ | | 11 | currentelement + File.separatorChar;↵
|
12 | }↵ | | 12 | ↵
|
| | | 13 | }↵
|
13 | }↵ | | 14 | }↵
|
14 | scandir(myfile, currentelement, true);↵ | | 15 | scandir(myfile.getAbsolutePath(), currentelement, true);↵
|
15 | }↵ | | 16 | ↵
|
| | | 17 | }↵
|
16 | } else {↵ | | 18 | } else {↵
|
17 | boolean included = isCaseSensitive()↵ | | 19 | if (isCaseSensitive↵
|
|
18 | ? originalpattern.equals(currentelement)↵ | | 20 | && originalpattern.equals(currentelement)) {↵
|
19 | : originalpattern.equalsIgnoreCase(currentelement);↵ | | 21 | accountForIncludedFile(currentelement);↵
|
20 | if (included) {↵ | | 22 | ↵
|
| | | 23 | } else if (!isCaseSensitive↵
|
| | | 24 | && originalpattern↵
|
| | | 25 | .equalsIgnoreCase(currentelement)) {↵
|
21 | accountForIncludedFile(currentelement, myfile);↵ | | 26 | accountForIncludedFile(currentelement↵
|
| | | 27 | );↵
|
22 | | | 28 |
|