NAnt SDK Documentation - v0.92 |

# TouchTask Class

Touches a file or set of files -- corresponds to the Unix touch command.

For a list of all members of this type, see TouchTask Members.

System.Object
NAnt.Core.Element
NAnt.Core.Task
NAnt.Core.Tasks.TouchTask

[Visual Basic]
<TaskName(Name:="touch")>
Public Class TouchTask
Inherits Task
[C#]
[TaskName(Name="touch")]
public class TouchTask : Task

#### Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

#### Remarks

If the file specified does not exist, the task will create it.

#### Example

Touch the `Main.cs` file. The current time is used.

    <touch file="Main.cs" />

Touch all executable files in the project base directory and its subdirectories.

    <touch>
        <fileset>
            <include name="**/*.exe" />
            <include name="**/*.dll" />
        </fileset>
    </touch>

#### Requirements

Namespace: NAnt.Core.Tasks

Assembly: NAnt.Core (in NAnt.Core.dll)

#### See Also

TouchTask Members | NAnt.Core.Tasks Namespace