ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file Copy.java Move.java
Date Sun, 03 Feb 2002 03:41:19 GMT
donaldp     02/02/02 19:41:19

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file
                        Copy.java Move.java
  Log:
  Minor touchups
  
  Revision  Changes    Path
  1.18      +11 -25    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Copy.java
  
  Index: Copy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Copy.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Copy.java	27 Jan 2002 00:25:11 -0000	1.17
  +++ Copy.java	3 Feb 2002 03:41:18 -0000	1.18
  @@ -15,18 +15,18 @@
   import java.util.Iterator;
   import org.apache.avalon.excalibur.io.FileUtil;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.Task;
  +import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.FilterSet;
   import org.apache.tools.ant.types.FilterSetCollection;
  -import org.apache.tools.ant.util.mappers.Mapper;
  -import org.apache.tools.ant.util.mappers.FileNameMapper;
  +import org.apache.tools.ant.types.ScannerUtil;
  +import org.apache.tools.ant.types.SourceFileScanner;
   import org.apache.tools.ant.util.FileUtils;
  +import org.apache.tools.ant.util.mappers.FileNameMapper;
   import org.apache.tools.ant.util.mappers.FlatFileNameMapper;
   import org.apache.tools.ant.util.mappers.IdentityMapper;
  -import org.apache.tools.ant.types.SourceFileScanner;
  -import org.apache.tools.ant.types.ScannerUtil;
  +import org.apache.tools.ant.util.mappers.Mapper;
   
   /**
    * A consolidated copy task. Copies a file or directory to a new file or
  @@ -53,7 +53,7 @@
   
       private boolean m_filtering;
       private boolean m_preserveLastModified;
  -    private boolean m_forceOverwrite;
  +    private boolean m_overwrite;
       private boolean m_flatten;
       private boolean m_includeEmpty = true;
   
  @@ -114,7 +114,7 @@
        */
       public void setOverwrite( final boolean overwrite )
       {
  -        m_forceOverwrite = overwrite;
  +        m_overwrite = overwrite;
       }
   
       /**
  @@ -207,7 +207,7 @@
                       m_destFile = new File( m_destDir, m_file.getName() );
                   }
   
  -                if( m_forceOverwrite ||
  +                if( m_overwrite ||
                       ( m_file.lastModified() > m_destFile.lastModified() ) )
                   {
                       m_fileCopyMap.put( m_file.getAbsolutePath(), m_destFile.getAbsolutePath()
);
  @@ -291,7 +291,7 @@
                                           final File toDir )
           throws TaskException
       {
  -        if( m_forceOverwrite )
  +        if( m_overwrite )
           {
               final ArrayList list = new ArrayList( names.length );
               for( int i = 0; i < names.length; i++ )
  @@ -346,7 +346,7 @@
                       final File src = new File( fromFile );
                       final File dest = new File( toFile );
   
  -                    if( m_forceOverwrite )
  +                    if( m_overwrite )
                       {
                           FileUtil.forceDelete( dest );
                       }
  @@ -415,11 +415,6 @@
       /**
        * Compares source files to destination files to see if they should be
        * copied.
  -     *
  -     * @param fromDir Description of Parameter
  -     * @param toDir Description of Parameter
  -     * @param files Description of Parameter
  -     * @param dirs Description of Parameter
        */
       protected void scan( File fromDir, File toDir, String[] files, String[] dirs )
           throws TaskException
  @@ -446,10 +441,6 @@
           }
       }
   
  -    //************************************************************************
  -    //  protected and private methods
  -    //************************************************************************
  -
       /**
        * Ensure we have a consistent and legal set of attributes, and set any
        * internal flags necessary based on different combinations of attributes.
  @@ -531,7 +522,7 @@
   
       protected boolean isForceOverwrite()
       {
  -        return m_forceOverwrite;
  +        return m_overwrite;
       }
   
       protected boolean isIncludeEmpty()
  @@ -557,10 +548,5 @@
       protected File getDestDir()
       {
           return m_destDir;
  -    }
  -
  -    protected void setForceOverwrite( final boolean forceOverwrite )
  -    {
  -        m_forceOverwrite = forceOverwrite;
       }
   }
  
  
  
  1.14      +1 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Move.java
  
  Index: Move.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Move.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Move.java	20 Jan 2002 17:35:02 -0000	1.13
  +++ Move.java	3 Feb 2002 03:41:18 -0000	1.14
  @@ -38,7 +38,7 @@
   {
       public Move()
       {
  -        setForceOverwrite( true );
  +        setOverwrite( true );
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message