Imports System
Imports System.IO
Public Class Touch
Public Shared Sub Main(ByVal args() As String)
Dim fi As FileInfo = New FileInfo("c:\\a.txt")
touchFile(fi)
End Sub
Public Shared Sub touchFile(ByVal fsi As FileSystemInfo)
Console.WriteLine("Touching: {0}", fsi.FullName)
Try
fsi.CreationTime = DateTime.Now
fsi.LastAccessTime = DateTime.Now
fsi.LastWriteTime = DateTime.Now
Catch e As Exception
Console.WriteLine("Error: {0}", e.Message)
End Try
End Sub
End Class