Which entry in li matches lname ? If the name contains wildcards, more than one entry may be returned.
(ListInfo[] li, String lname)
| 602 | * returned. |
| 603 | */ |
| 604 | private int findName(ListInfo[] li, String lname) { |
| 605 | int i; |
| 606 | // if the name contains a wildcard, there might be more than one |
| 607 | for (i = 0; i < li.length; i++) { |
| 608 | if (li[i].name.equals(lname)) |
| 609 | break; |
| 610 | } |
| 611 | if (i >= li.length) { // nothing matched exactly |
| 612 | // XXX - possibly should fail? But what if server |
| 613 | // is case insensitive and returns the preferred |
| 614 | // case of the name here? |
| 615 | i = 0; // use first one |
| 616 | } |
| 617 | return i; |
| 618 | } |
| 619 | |
| 620 | /** |
| 621 | * List all subfolders matching the specified pattern. |
no test coverage detected