Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
Apache Ant Source Code Files
Apache Ant Source Code Files are inside the Apache Ant source package file like apache-ant-1.10.10-src.zip. Unzip the source package file and go to the "src/main" sub-directory, you will see source code files.
Here is the list of Java source code files of the Apache Ant 1.10.10 in \Users\fyicenter\apache-ant-1.10.10\src\main:
✍: FYIcenter.com
⏎ org/apache/tools/ant/taskdefs/Copydir.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.tools.ant.taskdefs; import java.io.File; import java.io.IOException; import java.util.Hashtable; import java.util.Map; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.Project; /** * Copies a directory. * * @since Ant 1.1 * * @deprecated The copydir task is deprecated since Ant 1.2. Use copy instead. */ @Deprecated public class Copydir extends MatchingTask { private File srcDir; private File destDir; private boolean filtering = false; private boolean flatten = false; private boolean forceOverwrite = false; private Map<String, String> filecopyList = new Hashtable<>(); /** * The src attribute * * @param src the source file */ public void setSrc(File src) { srcDir = src; } /** * The dest attribute * * @param dest the destination file */ public void setDest(File dest) { destDir = dest; } /** * The filtering attribute. * Default is false. * @param filter if true use filtering */ public void setFiltering(boolean filter) { filtering = filter; } /** * The flattening attribute. * Default is false. * @param flatten if true use flattening */ public void setFlatten(boolean flatten) { this.flatten = flatten; } /** * The forceoverwrite attribute. * Default is false. * @param force if true overwrite even if the destination file * is newer that the source file */ public void setForceoverwrite(boolean force) { forceOverwrite = force; } /** * Execute the task. * @throws BuildException on error */ @Override public void execute() throws BuildException { log("DEPRECATED - The copydir task is deprecated. Use copy instead."); if (srcDir == null) { throw new BuildException("src attribute must be set!", getLocation()); } if (!srcDir.exists()) { throw new BuildException("srcdir " + srcDir.toString() + " does not exist!", getLocation()); } if (destDir == null) { throw new BuildException("The dest attribute must be set.", getLocation()); } if (srcDir.equals(destDir)) { log("Warning: src == dest", Project.MSG_WARN); } DirectoryScanner ds = super.getDirectoryScanner(srcDir); try { scanDir(srcDir, destDir, ds.getIncludedFiles()); if (filecopyList.size() > 0) { log("Copying " + filecopyList.size() + " file" + (filecopyList.size() == 1 ? "" : "s") + " to " + destDir.getAbsolutePath()); for (Map.Entry<String, String> e : filecopyList.entrySet()) { String fromFile = e.getKey(); String toFile = e.getValue(); try { getProject().copyFile(fromFile, toFile, filtering, forceOverwrite); } catch (IOException ioe) { String msg = "Failed to copy " + fromFile + " to " + toFile + " due to " + ioe.getMessage(); throw new BuildException(msg, ioe, getLocation()); } } } } finally { filecopyList.clear(); } } private void scanDir(File from, File to, String[] files) { for (String filename : files) { File srcFile = new File(from, filename); File destFile; if (flatten) { destFile = new File(to, new File(filename).getName()); } else { destFile = new File(to, filename); } if (forceOverwrite || (srcFile.lastModified() > destFile.lastModified())) { filecopyList.put(srcFile.getAbsolutePath(), destFile.getAbsolutePath()); } } } }
⏎ org/apache/tools/ant/taskdefs/Copydir.java
Or download all of them as a single archive file:
File name: apache-ant-1.10.10-fyi.zip File size: 2392938 bytes Release date: 2021-04-17 Download
⇐ Download Apache Ant Source Package
2021-07-10, 109762👍, 0💬
Popular Posts:
How to download and install mysql-connector-j-8.0.31 .zip?Connector/J Java library is a JDBC Driver ...
JDK 11 jdk.xml.dom.jmod is the JMOD file for JDK 11 XML DOM module. JDK 11 XML DOM module compiled c...
commons-lang-2.6.jar is the JAR file for Apache Commons Lang 2.6, which provides a host of helper ut...
JDK 1.1 source code directory contains Java source code for JDK 1.1 core classes: "C:\fyicenter\jdk-...
ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify ex...