Changes the attributes of a file or all files inside specified directories. Right now it has effect only under Windows. Each of the 4 possible permissions has its own attribute, matching the arguments for the attrib command.
FileSets can be specified
using nested <fileset>
elements.
Attribute | Description | Required |
file | the file or directory of which the permissions must be changed. | Yes or nested
<fileset> elements. |
readonly | the readonly permission. | at least one of the four. |
archive | the archive permission. | |
system | the system permission. | |
hidden | the hidden permission. | |
type | One of file, dir or both. If set to file, only the permissions of plain files are going to be changed. If set to dir, only the directories are considered. | No, default is file |
<attrib file="${dist}/run.bat" readonly="true" hidden="true"/>
makes the "run.bat" file read-only and hidden.
<attrib readonly="false"> <fileset dir="${meta.inf}" includes="**/*.xml"/> <attrib>
makes all ".xml" files below ${meta.inf}
readable.
<attrib readonly="true" archive="true"> <fileset dir="shared/sources1"> <exclude name="**/trial/**"/> </fileset> <fileset refid="other.shared.sources"/> </attrib>
makes all files below shared/sources1
(except those below any
directory named trial) read-only and archived. In addition all files belonging
to a FileSet with id
other.shared.sources
get the
same attributes.
Copyright © 2002 Apache Software Foundation. All rights Reserved.