Package java.io

Examples of java.io.FileFilter


    * @param invalidList  a list of error messages
    * @param failIfInvalid  whether to fail immediately after the first invalid file
    */
   private void scan(java.io.File f, final Set<String> names, final List<String> invalidList, final boolean failIfInvalid)
   {
      f.listFiles(new FileFilter()
      {
         public boolean accept(File pathname)
         {
            if (pathname.isDirectory())
            {
View Full Code Here


      // list only xml files.
      // Note: returns null only if the path name isn't a directory
      // or I/O exception occured
      File[] files = metaInf.listFiles(
        new FileFilter()
        {
           public boolean accept(File file)
           {
              if( file.getName().endsWith( ".xml" )
                 && !file.isDirectory() )
View Full Code Here

   {
      // return val
      List files = new ArrayList();

      // anonymous class
      FileFilter dirFilter = new FileFilter()
      {
         public boolean accept(File file)
         {
            return file.isDirectory() && !file.getName().startsWith(".");
         }
View Full Code Here

      if (deleteInTearDown)
      {
         File hypersonicDir = new File(HYPERSONIC_DIR);
         if (hypersonicDir.exists() && hypersonicDir.isDirectory())
         {
            FileFilter filter = new FileFilter() {
               public boolean accept(File file)
               {
                  return file.getName().indexOf(DB_NAME) >= 0;
               }
            };
View Full Code Here

        preferences, textureHomonymsCounter, identifiedTextures);

    if (texturesPluginFolders != null) {
      for (File texturesPluginFolder : texturesPluginFolders) {
        // Try to load sh3t files from textures plugin folder
        File [] pluginTexturesCatalogFiles = texturesPluginFolder.listFiles(new FileFilter () {
          public boolean accept(File pathname) {
            return pathname.isFile();
          }
        });
       
View Full Code Here

      final String versionPrefix = Home.CURRENT_VERSION + "-";
      final File sessionTemporaryFolder = new File(temporaryFolder,
          versionPrefix + TEMPORARY_SESSION_SUB_FOLDER);     
      if (!sessionTemporaryFolder.exists()) {
        // Retrieve existing folders working with same Sweet Home 3D version in temporary folder
        final File [] siblingTemporaryFolders = temporaryFolder.listFiles(new FileFilter() {
            public boolean accept(File file) {
              return file.isDirectory()
                  && file.getName().startsWith(versionPrefix);
            }
          });
View Full Code Here

        preferences, furnitureHomonymsCounter, identifiedFurniture);
   
    if (furniturePluginFolders != null) {
      for (File furniturePluginFolder : furniturePluginFolders) {
        // Try to load sh3f files from furniture plugin folder
        File [] pluginFurnitureCatalogFiles = furniturePluginFolder.listFiles(new FileFilter () {
          public boolean accept(File pathname) {
            return pathname.isFile();
          }
        });
       
View Full Code Here

  public PluginManager(File [] pluginFolders) {
    this.pluginFolders = pluginFolders;
    if (pluginFolders != null) {
      for (File pluginFolder : pluginFolders) {
        // Try to load plugin files from plugin folder
        File [] pluginFiles = pluginFolder.listFiles(new FileFilter () {
          public boolean accept(File pathname) {
            return pathname.isFile();
          }
        });
       
View Full Code Here

  /**
   * Reads the homes to recover.
   */
  private void readRecoveredHomes() throws RecorderException {
    File [] recoveredFiles = getRecoveryFolder().listFiles(new FileFilter() {
        public boolean accept(File file) {
          return file.isFile()
              && file.getName().endsWith(RECOVERED_FILE_EXTENSION);
        }
      });
View Full Code Here

        String[] sorted = null;
        String path = getPath() + System.getProperty("file.separator");
        if (path != null && path.length() < getText().length()) {
            File curr = new File(path);
            if (curr.exists() && curr.isDirectory()) {
                File[] possibleDirs = curr.listFiles(new FileFilter() {
                    public boolean accept(File pathname) {
                        return pathname.isDirectory();
                    }
                });
                ArrayList strings = new ArrayList();
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.