<touch>

Purpose/Function

Touches files (UNIX-only). One or more URIs can be added. Alternatively, (existing) files can be touched by giving a UriPattern, which will force an ls- operation first.

Attributes

NAME

TYPE

DEFAULT VALUE

DESCRIPTION

cleanup

boolean

true

delete the cache(s) upon termination of the operation

copyCache

ncsa.tools.trebuchet.core.cache.CopyCache

null

touch the target entries in this cache

copyCacheFile

java.io.File

null

touch the target entries in this cache

includeAncestors

boolean

false

include all the ancestors of each URI

listCache

ncsa.tools.trebuchet.core.cache.ListCache

null

touch the entries in this cache

listCacheFile

java.io.File

null

touch the entries in this cache

Listener control attributes

NAME

TYPE

DEFAULT VALUE

DESCRIPTION

event

boolean

true

if listener is a ProgressListener, send an event

log4j

boolean

false

if listener is a ProgressListener, use log4j

stdout

boolean

false

if listener is a ProgressListener, use stdout

Elements

TAG

TYPE

COUNT

DESCRIPTION

<configuration>

ncsa.tools.trebuchet.core.types.TrebuchetConfiguration

0:1

configuration with additional non-default settings

<pattern>

ncsa.tools.common.types.uri.UriPattern

0:1

pattern pattern to use with ls-operation

<configuration>

ncsa.tools.trebuchet.core.types.TrebuchetConfiguration

0:1

configuration with additional non-default settings

Listener elements

TAG

TYPE

COUNT

DESCRIPTION

<listener>

ncsa.tools.trebuchet.core.IOperationListener

0:N

generic tag, must be used in conjunction with xmlns:absoluteTag namespace

<logging-listener>

ncsa.tools.trebuchet.core.IOperationListener

0:N

built-in type; see listeners

<list-progress-listener>

ncsa.tools.trebuchet.core.IOperationListener

0:N

built-in type; see listeners

<list-metadata-listener>

ncsa.tools.trebuchet.core.IOperationListener

0:N

built-in type; see listeners

ReturnValues

DEFAULT NAME

TYPE

touch

ncsa.tools.trebuchet.core.operations.CacheBasedOperation

NOTES

  • For a given task, added URIs must all have the same scheme and endpoint.
  • Cleanup defaults to true, so caches that are used will be deleted unless otherwise indicated. The operation is returned only if cleanup is false.
  • If includeAncestors is true, the task forces mkdir on the ancestors of each <uri> element added.
  • It is possible to by-pass adding either URIs or a UriPattern by pointing the task at pre-existing caches, either as objects in the environment or as files.
  • Any additional settings passed in using the configuration object will be added to the default settings (the latter must be explicitly overridden if they are not desired).
  • An Ls- operation done in conjunction with <touch> by adding a <pattern> will automatically set the list-recursive property to true.

Examples

<ogrescript>
   <touch>
   	<uri>file:/tmp/dir0/file-0</uri>
   	<uri>file:/tmp/dir0/file-1</uri>
   	<uri>file:/tmp/dir0/file-2</uri>
   	<uri>file:/tmp/dir0/file-3</uri>
   </touch>
   <touch>
   	<pattern base="gsiscp://otfrid.ncsa.uiuc.edu/home/arossi">
           <exclude>**/.*</exclude>
        </pattern> 	
   </touch>
   ...	
</ogrescript>
  • No labels