Modifier and Type | Class and Description |
---|---|
static interface |
Touch.DateFormatFactory |
Modifier and Type | Field and Description |
---|---|
static Touch.DateFormatFactory |
DEFAULT_DF_FACTORY |
Constructor and Description |
---|
Touch()
Construct a new
Touch task. |
Modifier and Type | Method and Description |
---|---|
void |
add(FileNameMapper fileNameMapper)
Add a
FileNameMapper . |
void |
add(ResourceCollection rc)
Add a collection of resources to touch.
|
void |
addConfiguredMapper(Mapper mapper)
Add a
Mapper . |
void |
addFilelist(FileList list)
Add a filelist to touch.
|
void |
addFileset(FileSet set)
Add a set of files to touch.
|
protected void |
checkConfiguration()
Check that this task has been configured properly.
|
void |
execute()
Execute the touch operation.
|
void |
setDatetime(String dateTime)
Set the new modification time of file(s) touched
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)
Set the new modification time of file(s) touched
in milliseconds since midnight Jan 1 1970.
|
void |
setMkdirs(boolean mkdirs)
Set whether nonexistent parent directories should be created
when touching new files.
|
void |
setPattern(String pattern)
Set the format of the datetime attribute.
|
void |
setVerbose(boolean verbose)
Set whether the touch task will report every file it creates;
defaults to
true . |
protected void |
touch()
Does the actual work; assumes everything has been checked by now.
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
public static final Touch.DateFormatFactory DEFAULT_DF_FACTORY
public void add(FileNameMapper fileNameMapper) throws BuildException
FileNameMapper
.fileNameMapper
- the FileNameMapper
to add.BuildException
- if multiple mappers are added.public void add(ResourceCollection rc)
rc
- the collection to add.public void addConfiguredMapper(Mapper mapper)
Mapper
.mapper
- the Mapper
to add.public void addFilelist(FileList list)
list
- the Filelist
to add.public void addFileset(FileSet set)
set
- the Fileset
to add.protected void checkConfiguration() throws BuildException
BuildException
- if configuration errors are detected.public void execute() throws BuildException
execute
in class Task
BuildException
- if an error occurs.public void setDatetime(String dateTime)
dateTime
- the String
date in the specified format.public void setFile(File file)
file
- the File
to touch.public void setMillis(long millis)
millis
- the long
timestamp to use.public void setMkdirs(boolean mkdirs)
mkdirs
- boolean
whether to create parent directories.public void setPattern(String pattern)
pattern
- the SimpleDateFormat
-compatible format pattern.public void setVerbose(boolean verbose)
true
.verbose
- boolean
flag.protected void touch() throws BuildException
BuildException
- if an error occurs.