Logo Search packages:      
Sourcecode: jmk version File versions  Download package

static StringList edu::neu::ccs::jmk::StringUtils::glob ( StringList  input,
StringList  list 
) throws CommandFailedException [inline, static, package]

Expands file name that contain the wild card '*' to a list of file names. The inputs and outputs use generic separators.

See also:
CommandFailedException if wild card is misused

Definition at line 175 of file StringUtils.java.

References generalizePaths(), edu::neu::ccs::jmk::StringList::getRest(), edu::neu::ccs::jmk::StringList::getString(), localizePaths(), and edu::neu::ccs::jmk::StringList::setRest().

    if (input == null)
      return list;
    else {
      StringList head = new StringList("");
      StringList last = head;
      for (; input != null; input = input.getRest()) {
      String string = input.getString();
      String[] globbed = FileOperator.glob(localizePaths(string));
      for (int i = 0; i < globbed.length; i++) {
        StringList temp = new StringList(generalizePaths(globbed[i]));
        last = temp;
      return head.getRest();

Generated by  Doxygen 1.6.0   Back to index