org.apache.tools.ant.taskdefs
Class Touch
Touch a file and/or fileset(s) and/or filelist(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.
- Ant 1.1
void | addFilelist(FileList list) - Add a filelist to touch
|
void | addFileset(FileSet set) - Add a set of files to touch
|
void | execute() - Execute the touch operation.
|
void | setDatetime(String dateTime) - the new modification time of the file
in the format "MM/DD/YYYY HH:MM AM or PM"
or "MM/DD/YYYY HH:MM:SS AM or PM".
|
void | setFile(File file) - Sets a single source file to touch.
|
void | setMillis(long millis) - the new modification time of the file
in milliseconds since midnight Jan 1 1970.
|
protected void | touch() - Does the actual work; assumes everything has been checked by now.
|
protected void | touch(File file) - touch a single file with the current timestamp (this.millis)
|
execute , getDescription , getLocation , getOwningTarget , getRuntimeConfigurableWrapper , getTaskName , getTaskType , getWrapper , handleErrorFlush , handleErrorOutput , handleFlush , handleInput , handleOutput , init , isInvalid , log , log , maybeConfigure , perform , reconfigure , setDescription , setLocation , setOwningTarget , setRuntimeConfigurableWrapper , setTaskName , setTaskType |
Touch
public Touch()
Sole constructor.
addFilelist
public void addFilelist(FileList list)
Add a filelist to touch
addFileset
public void addFileset(FileSet set)
Add a set of files to touch
execute
public void execute()
throws BuildException
Execute the touch operation.
- execute in interface Task
setDatetime
public void setDatetime(String dateTime)
the new modification time of the file
in the format "MM/DD/YYYY HH:MM AM or PM"
or "MM/DD/YYYY HH:MM:SS AM or PM".
Optional, default=now
setFile
public void setFile(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)
the new modification time of the file
in milliseconds since midnight Jan 1 1970.
Optional, default=now
touch
protected void touch()
throws BuildException
Does the actual work; assumes everything has been checked by now.
touch
protected void touch(File file)
throws BuildException
touch a single file with the current timestamp (this.millis)
file
- file to touch
BuildException
-
Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.