Class RecursiveFileFinder

java.lang.Object
org.eclipse.ui.wizards.datatransfer.RecursiveFileFinder
All Implemented Interfaces:
IResourceVisitor

public class RecursiveFileFinder extends Object implements IResourceVisitor
A simple resource visitor that allows to find one or more files by name in a IContainer
Since:
3.12
  • Constructor Details

    • RecursiveFileFinder

      public RecursiveFileFinder(String fileName, Set<IPath> ignoredDirectories)
      Parameters:
      fileName - the name of the file to look for
      ignoredDirectories - which directories are excluded from research. Sub-directories will get ignored too.
  • Method Details

    • visit

      public boolean visit(IResource res)
      Description copied from interface: IResourceVisitor
      Visits the given resource.
      Specified by:
      visit in interface IResourceVisitor
      Parameters:
      res - the resource to visit
      Returns:
      true if the resource's members should be visited; false if they should be skipped
    • getFile

      public IFile getFile()
      Returns:
      the first found file with right name
    • getFiles

      public Set<IFile> getFiles()
      Returns:
      All found files