JaVa
   

Directory and File System Tasks

These are tasks focusing on file-based issues.

Chmod Task

The chmod task changes file permissions on Unix systems:

<chmod file="[file]" perm="[permissions]"/>


Parameters

Nested Parameters

Copy Task

The copy task attempts to create a copy of a file/directory structure and place it in a specified directory:

<copy file="[file name]" todir="[directory]"/>


Source files that are older then the destination files are not copied unless otherwise specified with the “overwrite” parameter. You can also use this command to copy a source file to a destination of a different name.

Parameters

Nested Parameters

Delete Task

The delete task removes a file or a file structure from a directory structure:

<delete file="/lib/foo.jar"/>


If the file or directory does not exist, execution is halted, unless the “quiet” parameter is set to “true”.

Parameters

Nested Parameters

Mkdir Task

The mkdir task creates a directory structure, adding directories when needed:

<mkdir dir="[directory]>


Parameter

Move Task

The move task attempts to delete the source file or single directory while creating a copy of that file or directory in a new location:

<move file="[file]" todir="[directory]"/>


Using move in conjunction with a “fileset” parameter enables you to move groups of files and directory structures. This command can also be used to move a source file to a destination with a different name.

Parameters

Nested Parameters

Touch Task

The touch task changes the modification time of existing files to the current time, unless a time is specifically stated. If the file does not exist, it is created:

<touch file="[file]"/>


Parameters


JaVa
   
Comments