org.apache.tools.ant.taskdefs
Class Touch
java.lang.Object
|
+--org.apache.tools.ant.ProjectComponent
|
+--org.apache.tools.ant.Task
|
+--org.apache.tools.ant.taskdefs.Touch
- public class Touch
- extends Task
Touch a file and/or fileset(s) -- corresponds to the Unix touch command.
If the file to touch doesn't exist, an empty one is
created.
Note: Setting the modification time of files is not supported in
JDK 1.1.
- Author:
- Stefan Bodewig, Michael J. Sikorsky, Robert Shaw
Constructor Summary |
Touch()
|
Method Summary |
void |
addFileset(FileSet set)
Adds a set of files (nested fileset attribute). |
void |
execute()
Execute the touch operation. |
void |
setDatetime(java.lang.String dateTime)
Date in the format MM/DD/YYYY HH:MM AM_PM. |
void |
setFile(java.io.File file)
Sets a single source file to touch. |
void |
setMillis(long millis)
Milliseconds since 01/01/1970 00:00 am. |
protected void |
touch()
Does the actual work. |
protected void |
touch(java.io.File file)
|
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Touch
public Touch()
setFile
public void setFile(java.io.File file)
- Sets a single source file to touch. If the file does not exist
an empty file will be created.
setMillis
public void setMillis(long millis)
- Milliseconds since 01/01/1970 00:00 am.
setDatetime
public void setDatetime(java.lang.String dateTime)
- Date in the format MM/DD/YYYY HH:MM AM_PM.
addFileset
public void addFileset(FileSet set)
- Adds a set of files (nested fileset attribute).
execute
public void execute()
throws BuildException
- Execute the touch operation.
- Overrides:
execute
in class Task
- Following copied from class:
org.apache.tools.ant.Task
- Throws:
BuildException
- if someting goes wrong with the build
touch
protected void touch()
throws BuildException
- Does the actual work. Entry point for Untar and Expand as well.
touch
protected void touch(java.io.File file)
throws BuildException
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.