Package java.io

Examples of java.io.FileFilter


    compiledProperties.setProperty(lastModifiedsKey, p.getProperty(lastModifiedsKey));
    compiledProperties.setProperty(filesKey, p.getProperty(filesKey));
    compiledProperties.setProperty("paoding.analysis.compiler.checksum",
        Snapshot.flash(
            new File(dicHomeFile, ".compiled/most-words-mode"),
            new FileFilter() {
              public boolean accept(File pathname) {
                return pathname.getPath().endsWith(
                    ".dic.compiled");
              }
            }).getCheckSum());
View Full Code Here


    File compliedMetadataFile = new File(dicHomeFile, ".compiled/sorting/.metadata");
    if (compliedMetadataFile.exists() && compliedMetadataFile.isFile()) {
      // get checksum for all compiled dictionaries
      String checksum = Snapshot.flash(
          new File(dicHomeFile, ".compiled/sorting"),
          new FileFilter() {
            public boolean accept(File pathname) {
              return pathname.getPath().endsWith(".dic.compiled");
            }
          }).getCheckSum();
View Full Code Here

    compiledProperties.setProperty(lastModifiedsKey, p.getProperty(lastModifiedsKey));
    compiledProperties.setProperty(filesKey, p.getProperty(filesKey));
    compiledProperties.setProperty("paoding.analysis.compiler.checksum",
        Snapshot.flash(
            new File(dicHomeFile, ".compiled/sorting"),
            new FileFilter() {
              public boolean accept(File pathname) {
                return pathname.getPath().endsWith(
                    ".dic.compiled");
              }
            }).getCheckSum());
View Full Code Here

    catch (Exception ex)
    {
      log.warning("classpath directory " + path + " error" + ex.getMessage());
      return result;
    }
    FileFilter fileFilter = new WildcardFileFilter(file);
    File[] thisFiles = fPath.listFiles(fileFilter);
    for (int i = 0; i < thisFiles.length; i++)
    {
      File f = thisFiles[i];
      if (f.exists())
View Full Code Here

      File[] files = rootDir.listFiles();
      if (files == null) {
        System.err.println("Destination directory is not a directory: " + rootDir.toString());
        return;
      }
      files = FileUtil.listFiles(rootDir, new FileFilter() {
        public boolean accept(File f) {
          return f.getName().equals("package-summary.html");
        }
      });
      for (int j = 0; j < files.length; j++) {
View Full Code Here

   * @throws FileNotFoundException
   * @throws IOException
   */
  private List<ResolvedType> addAspectsFromDirectory(File directory) throws FileNotFoundException, IOException {
    List<ResolvedType> addedAspects = new ArrayList<ResolvedType>();
    File[] classFiles = FileUtil.listFiles(directory, new FileFilter() {
      public boolean accept(File pathname) {
        return pathname.getName().endsWith(".class");
      }
    });
    for (File classFile : classFiles) {
View Full Code Here

   */
  public List<UnwovenClassFile> addDirectoryContents(File inFile, File outDir) throws IOException {
    List<UnwovenClassFile> addedClassFiles = new ArrayList<UnwovenClassFile>();

    // Get a list of all files (i.e. everything that isnt a directory)
    File[] files = FileUtil.listFiles(inFile, new FileFilter() {
      public boolean accept(File f) {
        boolean accept = !f.isDirectory();
        return accept;
      }
    });
View Full Code Here

   * @param dir
   *            目录
   * @return 子目录数组
   */
  public static File[] dirs(File dir) {
    return dir.listFiles(new FileFilter() {
      public boolean accept(File f) {
        return !f.isHidden() && f.isDirectory() && !f.getName().startsWith(".");
      }
    });
  }
View Full Code Here

    scanDirs(dir, list);
    return list.toArray(new File[list.size()]);
  }

  private static void scanDirs(File rootDir, List<File> list) {
    File[] dirs = rootDir.listFiles(new FileFilter() {
      public boolean accept(File f) {
        return !f.isHidden() && f.isDirectory() && !f.getName().startsWith(".");
      }
    });
    if (dirs != null) {
View Full Code Here

   * @param suffix
   *            文件后缀名。如果为 null,则获取全部文件
   * @return 文件数组
   */
  public static File[] files(File dir, final String suffix) {
    return dir.listFiles(new FileFilter() {
      public boolean accept(File f) {
        return !f.isHidden()
            && f.isFile()
            && (null == suffix || f.getName().endsWith(suffix));
      }
View Full Code Here

TOP

Related Classes of java.io.FileFilter

Copyright © 2018 www.massapicom. 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.