企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# B.5 AttribTask 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 or FileLists can be specified using nested `fileset` and `filelist` elements. By default this task won't do anything unless it detects it is running on a Windows system. If you know for sure that you have a "attrib" executable on your PATH that is command line compatible with the Windows command, you can use the task's os attribute and set its value to your current os. Table B.7:聽Attributes NameTypeDescriptionDefaultRequired`file``String`The file or directory of which the permissions must be changed.n/aYes`readonly``Boolean`The readonly permission.n/aat least one of the four.`archive``Boolean`The archive permission.n/a`system``Boolean`The system permission.n/a`hidden``Boolean`The hidden permission.n/a`verbose``Boolean`Whether to print a summary after execution or not. Defaults to false.falseNo`os``String`List of Operating Systems on which the command may be executed.n/aNo B.5.1 Example `<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. B.5.2 Supported Nested Tags - `filelist` - `fileset`