Changes the file attributes of a file or set of files and directories.
For a list of all members of this type, see AttribTask Members.
System.Object
NAnt.Core.Element
NAnt.Core.Task
NAnt.Core.Tasks.AttribTask
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
AttribTask does not have the concept of turning attributes off. Instead you specify all the attributes that you want turned on and the rest are turned off by default.
Refer to the FileAttributes enumeration in the .NET SDK for more information about file attributes.
Set the read-only
file attribute for the specified file in the project directory.
<attrib file="myfile.txt" readonly="true" />
Set the normal
file attribute for the specified file.
<attrib file="myfile.txt" normal="true" />
Set the normal
file attribute for all executable files in the current project directory and sub-directories.
<attrib normal="true"> <fileset> <include name="**/*.exe" /> <include name="bin" /> </fileset> </attrib>
Namespace: NAnt.Core.Tasks
Assembly: NAnt.Core (in NAnt.Core.dll)
AttribTask Members | NAnt.Core.Tasks Namespace