org.apache.commons.vfs2.tasks
Class MoveTask

java.lang.Object
  extended by Task
      extended by org.apache.commons.vfs2.tasks.VfsTask
          extended by org.apache.commons.vfs2.tasks.AbstractSyncTask
              extended by org.apache.commons.vfs2.tasks.CopyTask
                  extended by org.apache.commons.vfs2.tasks.MoveTask

public class MoveTask
extends CopyTask

An Ant task that moves matching files.

Author:
Commons VFS team

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.commons.vfs2.tasks.AbstractSyncTask
AbstractSyncTask.SourceInfo
 
Constructor Summary
MoveTask()
           
 
Method Summary
protected  void handleOutOfDateFile(FileObject srcFile, FileObject destFile)
          Handles a single source file.
 void setTryRename(boolean tryRename)
          Enable/disable move/rename of file (if possible).
 
Methods inherited from class org.apache.commons.vfs2.tasks.CopyTask
handleUpToDateFile, isOverwrite, isPreserveLastModified, setOverwrite, setPreserveLastModified
 
Methods inherited from class org.apache.commons.vfs2.tasks.AbstractSyncTask
addConfiguredSrc, detectMissingSourceFiles, execute, handleMissingSourceFile, isFailonerror, logOrDie, setDestDir, setDestFile, setFailonerror, setIncludes, setSrc, setSrcDir, setSrcDirIsBase
 
Methods inherited from class org.apache.commons.vfs2.tasks.VfsTask
closeManager, resolveFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoveTask

public MoveTask()
Method Detail

setTryRename

public void setTryRename(boolean tryRename)
Enable/disable move/rename of file (if possible).

Parameters:
tryRename - true if the file should be renamed.

handleOutOfDateFile

protected void handleOutOfDateFile(FileObject srcFile,
                                   FileObject destFile)
                            throws FileSystemException
Handles a single source file.

Overrides:
handleOutOfDateFile in class CopyTask
Parameters:
srcFile - The source FileObject.
destFile - The destination FileObject.
Throws:
FileSystemException