Class FileSet
- java.lang.Object
-
- org.eclipse.tycho.p2.impl.publisher.rootfiles.AbstractFileSet
-
- org.eclipse.tycho.p2.impl.publisher.rootfiles.FileSet
-
public class FileSet extends AbstractFileSet
Ant-like file set. Wildcards *, ** and ? are implemented as described on
{@link http://en.wikibooks.org/wiki/Apache_Ant/Fileset }. This is not a complete equivalent implementation of the ant fileset. Only the subset needed for PDE root files is supported.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.File
baseDir
private java.lang.String
destinationDir
-
Fields inherited from class org.eclipse.tycho.p2.impl.publisher.rootfiles.AbstractFileSet
defaultExcludePatterns, includePattern
-
-
Constructor Summary
Constructors Constructor Description FileSet(java.io.File baseDir, java.lang.String pattern)
Equivalent to#FileSet(File, String, boolean)
with useDefaultExludes == true; destinationDir = ""FileSet(java.io.File baseDir, java.lang.String pattern, java.lang.String destinationDir, boolean useDefaultExcludes)
Creates a fileset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addFileIfMatch(java.io.File file, FileToPathMap result, org.eclipse.core.runtime.IPath baseDir, org.eclipse.core.runtime.IPath destination)
java.io.File
getBaseDir()
private void
recursiveScan(java.io.File file, FileToPathMap result, org.eclipse.core.runtime.IPath baseDirPath, org.eclipse.core.runtime.IPath destinationPath)
FileToPathMap
scan()
Scan the filesystem below baseDir for matching files.-
Methods inherited from class org.eclipse.tycho.p2.impl.publisher.rootfiles.AbstractFileSet
matches
-
-
-
-
Constructor Detail
-
FileSet
public FileSet(java.io.File baseDir, java.lang.String pattern)
Equivalent to#FileSet(File, String, boolean)
with useDefaultExludes == true; destinationDir = ""
-
FileSet
public FileSet(java.io.File baseDir, java.lang.String pattern, java.lang.String destinationDir, boolean useDefaultExcludes)
Creates a fileset.- Parameters:
baseDir
- the base directory to scanpattern
- ant file inclusion pattern (relative to baseDir). Wildcards **,* and ? are supported.useDefaultExcludes
- whether to use default file excludes for typical SCM metadata files.
-
-
Method Detail
-
getBaseDir
public java.io.File getBaseDir()
-
scan
public FileToPathMap scan()
Scan the filesystem below baseDir for matching files.- Returns:
- map canonical File -> basedir-relative path
-
recursiveScan
private void recursiveScan(java.io.File file, FileToPathMap result, org.eclipse.core.runtime.IPath baseDirPath, org.eclipse.core.runtime.IPath destinationPath)
-
addFileIfMatch
private void addFileIfMatch(java.io.File file, FileToPathMap result, org.eclipse.core.runtime.IPath baseDir, org.eclipse.core.runtime.IPath destination)
-
-