org.apache.tools.ant.taskdefs
Class Touch

java.lang.Object
  |
  +--org.apache.tools.ant.Task
        |
        +--org.apache.tools.ant.taskdefs.Touch

public class Touch
extends Task

Touch a file - corresponds to the Unix touch command.

If the file to touch doesn't exist, an empty one is created. Setting the modification time of files is not supported in JDK 1.1.

Author:
Stefan Bodewig

Fields inherited from class org.apache.tools.ant.Task
description, location, project, target, taskName, taskType, wrapper
 
Constructor Summary
Touch()
           
 
Method Summary
 void execute()
          Do the work.
 void setDatetime(java.lang.String dateTime)
          Date in the format MM/DD/YYYY HH:MM AM_PM.
 void setFile(java.io.File file)
          The name of the file to touch.
 void setMillis(long millis)
          Milliseconds since 01/01/1970 00:00 am.
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Touch

public Touch()
Method Detail

setFile

public void setFile(java.io.File file)
The name of the file to touch.

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.

execute

public void execute()
             throws BuildException
Do the work.
Overrides:
execute in class Task
Throws:
BuildException - Thrown in unrecoverable error.


Copyright ? 2000 Apache Software Foundation. All Rights Reserved.