org.apache.commons.vfs.tasks
Class CopyTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.apache.commons.vfs.tasks.VfsTask
              extended byorg.apache.commons.vfs.tasks.AbstractSyncTask
                  extended byorg.apache.commons.vfs.tasks.CopyTask
Direct Known Subclasses:
MoveTask, SyncTask

public class CopyTask
extends AbstractSyncTask

An Ant task that copies matching files.

Version:
$Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Mi, 29 Nov 2006) $
Author:
Adam Murdoch

Nested Class Summary
 
Nested classes inherited from class org.apache.commons.vfs.tasks.AbstractSyncTask
AbstractSyncTask.SourceInfo
 
Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
CopyTask()
           
 
Method Summary
protected  void handleOutOfDateFile(FileObject srcFile, FileObject destFile)
          Handles an out-of-date file.
protected  void handleUpToDateFile(FileObject srcFile, FileObject destFile)
          Handles an up-to-date file.
 boolean isOverwrite()
           
 boolean isPreserveLastModified()
           
 void setOverwrite(boolean overwrite)
          Enable/disable overwriting of up-to-date files.
 void setPreserveLastModified(boolean preserveLastModified)
          Enable/disable preserving last modified time of copied files.
 
Methods inherited from class org.apache.commons.vfs.tasks.AbstractSyncTask
addConfiguredSrc, detectMissingSourceFiles, execute, handleMissingSourceFile, isFailonerror, logOrDie, setDestDir, setDestFile, setFailonerror, setIncludes, setSrc, setSrcDir, setSrcDirIsBase
 
Methods inherited from class org.apache.commons.vfs.tasks.VfsTask
closeManager, resolveFile
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyTask

public CopyTask()
Method Detail

setOverwrite

public void setOverwrite(boolean overwrite)
Enable/disable overwriting of up-to-date files.


setPreserveLastModified

public void setPreserveLastModified(boolean preserveLastModified)
Enable/disable preserving last modified time of copied files.


isOverwrite

public boolean isOverwrite()
Returns:
the curent value of overwrite

isPreserveLastModified

public boolean isPreserveLastModified()
Returns:
the curent value of preserveLastModified

handleOutOfDateFile

protected void handleOutOfDateFile(FileObject srcFile,
                                   FileObject destFile)
                            throws FileSystemException
Handles an out-of-date file.

Overrides:
handleOutOfDateFile in class AbstractSyncTask
Throws:
FileSystemException

handleUpToDateFile

protected void handleUpToDateFile(FileObject srcFile,
                                  FileObject destFile)
                           throws FileSystemException
Handles an up-to-date file.

Overrides:
handleUpToDateFile in class AbstractSyncTask
Throws:
FileSystemException


Copyright © 2002-2006 The Apache Software Foundation. All Rights Reserved.