Package: org.gradle.api.tasks

## [Java] Class Sync

- org.gradle.api.tasks.Sync

- Synchronises the contents of a destination directory with some source directories and files.

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `protected CopyAction` | `createCopyAction()`
    `protected CopySpecInternal` | `createRootSpec()`
    `File` | `getDestinationDir()` Returns the directory to copy files into.
    `DestinationRootCopySpec` | `getRootSpec()`
    `void` | `setDestinationDir(File destinationDir)` Sets the directory to copy files into.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractCopyTask` | `copy, createCopyAction, createRootSpec, eachFile, eachFile, exclude, exclude, exclude, exclude, expand, filesMatching, filesNotMatching, filter, filter, filter, from, from, getDirMode, getDuplicatesStrategy, getExcludes, getFileLookup, getFileMode, getFileResolver, getFileSystem, getIncludeEmptyDirs, getIncludes, getInstantiator, getMainSpec, getRootSpec, getSource, include, include, include, include, into, into, isCaseSensitive, rename, rename, rename, setCaseSensitive, setDirMode, setDuplicatesStrategy, setExcludes, setFileMode, setIncludeEmptyDirs, setIncludes, with`

- - ### Method Detail

    - #### @Override protected CopyAction createCopyAction()

    - #### @Override protected CopySpecInternal createRootSpec()

    - #### @OutputDirectory public File getDestinationDir()

      Returns the directory to copy files into.

      Returns:
        The destination dir.

    - #### @Override public DestinationRootCopySpec getRootSpec()

    - #### public void setDestinationDir(File destinationDir)

      Sets the directory to copy files into. This is the same as calling into(Object) on this task.

      Parameters:
        `destinationDir` - The destination directory. Must not be null.