Sync.SyncTarget (Apache Ant API)
Date: 2018-03-24

org.apache.tools.ant.taskdefs

## Class Sync.SyncTarget

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.tools.ant.types.DataType
    - - org.apache.tools.ant.types.AbstractFileSet
      - - org.apache.tools.ant.taskdefs.Sync.SyncTarget

- All Implemented Interfaces:
    java.lang.Cloneable, SelectorContainer
  Enclosing class:
    Sync

      public static class Sync.SyncTarget
      extends AbstractFileSet

  Inner class used to hold exclude patterns and selectors to save stuff that happens to live in the target directory but should not get removed.
  Since:
    Ant 1.7

- - ### Field Summary

    - ### Fields inherited from class org.apache.tools.ant.types.DataType

      `checked, ref`

    - ### Fields inherited from class org.apache.tools.ant.ProjectComponent

      `description, location, project`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SyncTarget()` Constructor for SyncTarget.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Boolean` | `getPreserveEmptyDirs()` Whether empty directories matched by this fileset should be preserved.
    `void` | `setDir(java.io.File dir)` Override AbstractFileSet#setDir(File) to disallow setting the directory.
    `void` | `setPreserveEmptyDirs(boolean b)` Whether empty directories matched by this fileset should be preserved.

    - ### Methods inherited from class org.apache.tools.ant.types.AbstractFileSet

      `add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addExecutable, addFilename, addMajority, addModified, addNone, addNot, addOr, addOwnedBy, addPresent, addReadable, addSelector, addSize, addSymlink, addType, addWritable, appendExcludes, appendIncludes, appendSelector, clone, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, dieOnCircularReference, getDefaultexcludes, getDir, getDir, getDirectoryScanner, getDirectoryScanner, getErrorOnMissingDir, getMaxLevelsOfSymlinks, getRef, getSelectors, hasPatterns, hasSelectors, isCaseSensitive, isFollowSymlinks, mergeExcludes, mergeIncludes, mergePatterns, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setErrorOnMissingDir, setExcludes, setExcludesfile, setFile, setFollowSymlinks, setIncludes, setIncludesfile, setMaxLevelsOfSymlinks, setRefid, setupDirectoryScanner, setupDirectoryScanner, toString`

    - ### Methods inherited from class org.apache.tools.ant.types.DataType

      `checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes`

    - ### Methods inherited from class org.apache.tools.ant.ProjectComponent

      `getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SyncTarget

          public SyncTarget()

      Constructor for SyncTarget. This just changes the default value of "defaultexcludes" from true to false.

  - ### Method Detail

    - #### setDir

          public void setDir(java.io.File dir)
                      throws BuildException

      Override AbstractFileSet#setDir(File) to disallow setting the directory.
      Overrides:
        `setDir` in class `AbstractFileSet`
      Parameters:
        `dir` - ignored
      Throws:
        `BuildException` - always

    - #### setPreserveEmptyDirs

          public void setPreserveEmptyDirs(boolean b)

      Whether empty directories matched by this fileset should be preserved.
      Parameters:
        `b` - boolean
      Since:
        Ant 1.8.0

    - #### getPreserveEmptyDirs

          public java.lang.Boolean getPreserveEmptyDirs()

      Whether empty directories matched by this fileset should be preserved.
      Returns:
        Boolean
      Since:
        Ant 1.8.0