com.notuvy.file
Class FileCopy
java.lang.Object
com.notuvy.file.FileCopy
- All Implemented Interfaces:
- Runnable
public class FileCopy
- extends Object
- implements Runnable
A utility to copy files.
- Version:
- $Id: Sample.java,v 1.1 2006/06/07 03:29:59 murali Exp $
- Author:
- murali
Field Summary |
protected static org.apache.log4j.Logger |
LOG
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final org.apache.log4j.Logger LOG
FileCopy
public FileCopy(File pSource,
File pDestination)
getSource
public File getSource()
getDestination
public File getDestination()
getSuccessful
public boolean getSuccessful()
getCreateDestinationParent
public boolean getCreateDestinationParent()
getNoOverwrite
public boolean getNoOverwrite()
getProgress
public Progressable getProgress()
setSuccessful
protected void setSuccessful(boolean pSuccessful)
setCreateDestinationParent
public void setCreateDestinationParent(boolean pCreateDestinationParent)
setNoOverwrite
public void setNoOverwrite(boolean pNoOverwrite)
setProgress
public void setProgress(Progressable pProgress)
preconditionsHold
protected boolean preconditionsHold()
- Check all the preconditions for a valid copy.
If the parent directory of the destination does not exist, then create
if directed to do so, or fail if not.
- Returns:
- A boolean flag that indicates that all the precondtions are valid.
doCopy
protected void doCopy()
throws IOException
- Throws:
IOException
run
public void run()
- Specified by:
run
in interface Runnable
Copyright © 2013. All Rights Reserved.