If the file to touch doesn't exist, an empty one is created.
Modifier and Type | Class and Description |
---|---|
public static interface |
Modifier and Type | Field and Description |
---|---|
private String | |
private boolean | |
public static final Touch. | DEFAULT_DF_FACTORY
Provides access to DateUtils.EN_US_DATE_FORMAT_MIN (primary) and DateUtils.EN_US_DATE_FORMAT_SEC (fallback). |
private Touch. | |
private File | |
private static final FileUtils | |
private FileNameMapper | |
private List | |
private long | |
private boolean | |
private Union | |
private boolean |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public void | |
public synchronized void | |
public void | |
public void | |
public void | |
protected synchronized void | |
public void | |
private long | |
public void | setDatetime(String
the dateTime)String date in the specified format.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". |
public void | |
public void | setMillis(long
the millis)long timestamp to use.Set the new modification time of file(s) touched in milliseconds since midnight Jan 1 1970. |
public void | setMkdirs(boolean
boolean whether to create parent directories.Set whether nonexistent parent directories should be created when touching new files. |
public void | setPattern(final String
the pattern)SimpleDateFormat -compatible format pattern.Set the format of the datetime attribute. |
public void | setVerbose(boolean
boolean flag.Set whether the touch task will report every file it creates;
defaults to |
protected void | |
protected void | |
private void | |
private void |
dateTime | back to summary |
---|---|
private String dateTime |
dateTimeConfigured | back to summary |
---|---|
private boolean dateTimeConfigured |
DEFAULT_DF_FACTORY | back to summary |
---|---|
public static final Touch. Provides access to DateUtils.EN_US_DATE_FORMAT_MIN (primary) and DateUtils.EN_US_DATE_FORMAT_SEC (fallback). |
dfFactory | back to summary |
---|---|
private Touch. |
file | back to summary |
---|---|
private File file |
FILE_UTILS | back to summary |
---|---|
private static final FileUtils FILE_UTILS |
fileNameMapper | back to summary |
---|---|
private FileNameMapper fileNameMapper |
filesets | back to summary |
---|---|
private List<FileSet> filesets |
millis | back to summary |
---|---|
private long millis |
mkdirs | back to summary |
---|---|
private boolean mkdirs |
resources | back to summary |
---|---|
private Union resources |
verbose | back to summary |
---|---|
private boolean verbose |
Touch | back to summary |
---|---|
public Touch() |
add | back to summary |
---|---|
public void add(FileNameMapper fileNameMapper) throws BuildException Add a
|
add | back to summary |
---|---|
public synchronized void add(ResourceCollection rc) Add a collection of resources to touch.
|
addConfiguredMapper | back to summary |
---|---|
public void addConfiguredMapper(Mapper mapper) Add a
|
addFilelist | back to summary |
---|---|
public void addFilelist(FileList list) Add a filelist to touch.
|
addFileset | back to summary |
---|---|
public void addFileset(FileSet set) Add a set of files to touch.
|
checkConfiguration | back to summary |
---|---|
protected synchronized void checkConfiguration() throws BuildException Check that this task has been configured properly.
|
execute | back to summary |
---|---|
public void execute() throws BuildException Overrides org. Execute the touch operation.
|
getTimestamp | back to summary |
---|---|
private long getTimestamp() |
setDatetime | back to summary |
---|---|
public 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". Optional, default=now.
|
setFile | back to summary |
---|---|
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 | back to summary |
---|---|
public void setMillis(long millis) Set the new modification time of file(s) touched in milliseconds since midnight Jan 1 1970. Optional, default=now.
|
setMkdirs | back to summary |
---|---|
public void setMkdirs(boolean mkdirs) Set whether nonexistent parent directories should be created when touching new files.
|
setPattern | back to summary |
---|---|
public void setPattern(final String pattern) Set the format of the datetime attribute.
|
setVerbose | back to summary |
---|---|
public void setVerbose(boolean verbose) Set whether the touch task will report every file it creates;
defaults to
|
touch | back to summary |
---|---|
protected void touch() throws BuildException Does the actual work; assumes everything has been checked by now.
|
touch | back to summary |
---|---|
protected void touch(File file)
Deprecated since 1.6.x. Touch a single file with the current timestamp (this.millis). This method does not interact with any nested mappers and remains for reasons of backwards-compatibility only.
|
touch | back to summary |
---|---|
private void touch(Resource r, long defaultTimestamp) |
touch | back to summary |
---|---|
private void touch(File file, long modTime) |
Modifier and Type | Method and Description |
---|---|
public DateFormat | |
public DateFormat |
getFallbackFormat | back to summary |
---|---|
public DateFormat getFallbackFormat() |
getPrimaryFormat | back to summary |
---|---|
public DateFormat getPrimaryFormat() |