int (String name) { final int fileIdx = StringUtil.indexOfIgnoreCase(name, "file", 0); if (fileIdx > -1) { return fileIdx; } final int dirIdx = StringUtil.indexOfIgnoreCase(name, "directory", 0); if (dirIdx > -1) { return dirIdx; } return 0; }