Browse Source

+2 convenience methods

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277605 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 20 years ago
parent
commit
c9c8d0cab6
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      src/main/org/apache/tools/ant/types/AbstractFileSet.java

+ 17
- 0
src/main/org/apache/tools/ant/types/AbstractFileSet.java View File

@@ -120,6 +120,14 @@ public abstract class AbstractFileSet extends DataType
this.dir = dir; this.dir = dir;
} }


/**
* Retrieves the base-directory for this instance.
* @return <code>File</code>.
*/
public synchronized File getDir() {
return getDir(getProject());
}

/** /**
* Retrieves the base-directory for this instance. * Retrieves the base-directory for this instance.
* @param p the <code>Project</code> against which the * @param p the <code>Project</code> against which the
@@ -386,6 +394,15 @@ public abstract class AbstractFileSet extends DataType
* Returns the directory scanner needed to access the files to process. * Returns the directory scanner needed to access the files to process.
* @return a <code>DirectoryScanner</code> instance. * @return a <code>DirectoryScanner</code> instance.
*/ */
public DirectoryScanner getDirectoryScanner() {
return getDirectoryScanner(getProject());
}

/**
* Returns the directory scanner needed to access the files to process.
* @param p the Project against which the DirectoryScanner should be configured.
* @return a <code>DirectoryScanner</code> instance.
*/
public DirectoryScanner getDirectoryScanner(Project p) { public DirectoryScanner getDirectoryScanner(Project p) {
if (isReference()) { if (isReference()) {
return getRef(p).getDirectoryScanner(p); return getRef(p).getDirectoryScanner(p);


Loading…
Cancel
Save