Examples of GlobFilenameFilter


Examples of org.apache.oro.io.GlobFilenameFilter

            throw new NNTPException("create article failed",ex);
        }
    }
    public Iterator getMatchedGroups(String wildmat) {
        File[] f = rootPath.listFiles(new AndFileFilter
            (new DirectoryFileFilter(),new GlobFilenameFilter(wildmat)));
        return getGroups(f);
    }
View Full Code Here

Examples of org.apache.oro.io.GlobFilenameFilter

      int separatorIndex = pathAndPattern.lastIndexOf(File.separator);
      String path = pathAndPattern.substring(0, separatorIndex + 1);
      String pattern = pathAndPattern.substring(separatorIndex + 1);

      File[] files = new File(path).listFiles((FileFilter) new GlobFilenameFilter(pattern));
      files = (files == null ? new File[0] : files);
      return ContainerUtil.map(files, new Function<File, String>() {
        @Override public String fun(File file) {
          return file.getAbsolutePath();
        }
View Full Code Here

Examples of org.apache.oro.io.GlobFilenameFilter

    /**
     * @see org.apache.james.nntpserver.repository.NNTPRepository#getMatchedGroups(String)
     */
    public Iterator getMatchedGroups(String wildmat) {
        File[] f = rootPath.listFiles(new AndFileFilter
            (new DirectoryFileFilter(),new GlobFilenameFilter(wildmat)));
        return getGroups(f);
    }
View Full Code Here

Examples of org.apache.oro.io.GlobFilenameFilter

          default:
            throw new GroupsException(DEBUG_CLASS_NAME +
                ".searchForGroups(): Unknown search method: " + searchMethod);
        }

        FilenameFilter filter = new GlobFilenameFilter(nameFilter);
        Set allDirs = getAllDirectoriesBelow(baseDir);
        allDirs.add(baseDir);

        for (Iterator itr = allDirs.iterator(); itr.hasNext(); )
        {
View Full Code Here

Examples of org.apache.oro.io.GlobFilenameFilter

          default:
            throw new GroupsException(DEBUG_CLASS_NAME +
                ".searchForGroups(): Unknown search method: " + searchMethod);
        }

        FilenameFilter filter = new GlobFilenameFilter(nameFilter);
        Set allDirs = getAllDirectoriesBelow(baseDir);
        allDirs.add(baseDir);

        for (Iterator itr = allDirs.iterator(); itr.hasNext(); )
        {
View Full Code Here

Examples of org.apache.oro.io.GlobFilenameFilter

     * @see org.apache.james.nntpserver.repository.NNTPRepository#getMatchedGroups(String)
     */
    public Iterator getMatchedGroups(String wildmat) {
        // TODO: Add filter for valid group names
        File[] f = rootPath.listFiles(new AndFileFilter
            (new DirectoryFileFilter(),new GlobFilenameFilter(wildmat)));
        return getGroups(f);
    }
View Full Code Here

Examples of org.apache.oro.io.GlobFilenameFilter

    /**
     * @see org.apache.james.nntpserver.repository.NNTPRepository#getMatchedGroups(String)
     */
    public Iterator getMatchedGroups(String wildmat) {
        File[] f = rootPath.listFiles(new AndFileFilter(new GroupFilter(), new AndFileFilter
            (new DirectoryFileFilter(),new GlobFilenameFilter(wildmat))));
        return getGroups(f);
    }
View Full Code Here

Examples of org.apache.oro.io.GlobFilenameFilter

            ignoreFiles = new ArrayList();
            while (st.hasMoreTokens()) {
                String pattern = st.nextToken();
                // Compile the pattern
                try {
                    ignoreFiles.add (new GlobFilenameFilter(pattern));
                } catch (MalformedCachePatternException e) {
                    throw new CruiseControlException("Invalid filename pattern '" + pattern + "'", e);
                }
            }
        }
View Full Code Here

Examples of org.apache.oro.io.GlobFilenameFilter

        if (File.separatorChar == '\\') {
            path = path.replace('\\', '/');
        }

        for (Iterator iterator = ignoreFiles.iterator(); iterator.hasNext(); ) {
            GlobFilenameFilter pattern = (GlobFilenameFilter) iterator.next();

            // We have to use a little tweak here, since GlobFilenameFilter only matches the filename, but not
            // the path, so we use the complete path as the 'filename'-argument.
            if (pattern.accept(file, path)) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of org.apache.oro.io.GlobFilenameFilter

     * @throws CruiseControlException if an invalid pattern is specified.
     */
    private void compilePattern() throws CruiseControlException {
        if (fileNameFilter == null && pattern != null) {
            try {
               fileNameFilter = new GlobFilenameFilter(pattern);
            } catch (MalformedCachePatternException e) {
                ValidationHelper.fail("Invalid filename pattern " + pattern, e);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.