Examples of GlobFilenameFilter


Examples of org.apache.oro.io.GlobFilenameFilter

        ValidationHelper.assertFalse(getPassword() != null && getUsername() == null,
            "'username' is required if 'password' is set for email.");

        for (int i = 0; i < alertAddresses.length; i++) {
            try {
                alertAddresses[i].fileFilter = new GlobFilenameFilter(alertAddresses[i].fileRegExpr);
            } catch (MalformedCachePatternException mcpe) {
                ValidationHelper.fail("invalid regexp '" + alertAddresses[i].fileRegExpr + "'", mcpe);
            }
        }
    }
View Full Code Here

Examples of org.apache.oro.io.GlobFilenameFilter

        } else {
          File file = basePath != null ? new File(basePath.getAbsoluteFile(), f) : new File(f);
          File testFile = file.getAbsoluteFile();
          File dir = testFile.getParentFile().getAbsoluteFile();
          final String pattern = file.getName();
          String[] filteredFiles = dir.list(new GlobFilenameFilter(pattern,
              GlobCompiler.DEFAULT_MASK | GlobCompiler.CASE_INSENSITIVE_MASK));

          if (filteredFiles == null || filteredFiles.length == 0) {
            String error = "The patterns/paths " + f  + " used in the configuration"
                + " file didn't match any file, the files patterns/paths need to be relative to"
View Full Code Here

Examples of org.apache.oro.io.GlobFilenameFilter

    }
    return Joiner.on(File.separator).join(resolved);
  }

  private String[] expandGlob(String filePath, String fileNamePattern, File dir) {
    FilenameFilter fileFilter = new GlobFilenameFilter(fileNamePattern,
            GlobCompiler.DEFAULT_MASK | GlobCompiler.CASE_INSENSITIVE_MASK);
    String[] filteredFiles = expandDeepDirectoryGlobPaths(dir, fileFilter, "").toArray(new String[0]);

    if (filteredFiles == null || filteredFiles.length == 0) {
        return null;
View Full Code Here

Examples of org.apache.oro.io.GlobFilenameFilter

   
    public static File [] getResourcesAsFiles(String resourcePath, ClassLoader classloader, Object context)
    {
        File file = getResourceAsFile(resourcePath, classloader, context);
        File parent = file.getParentFile();
        FilenameFilter filter = new GlobFilenameFilter(file.getName());
        return parent.listFiles(filter);
    }
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

            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

    /**
     * @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

        if (file == null) {
          return null;
        }

        File parent = file.getParentFile();
        FilenameFilter filter = new GlobFilenameFilter(file.getName());
        return parent.listFiles(filter);
    }
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.