Visual Basic NET ( 3)




, , , - 2


' 5.txt temp c:

File.Delete("c:\temp\5.txt")

' 6.txt temp c:, .....

If File.Exists("c:\temp\6.txt") Then Debug.WriteLine(" ") _

Else Debug.WriteLine(" ")

End Sub

.

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

' 6.txt temp c: (Hidden):

File.SetAttributes("c:\temp\6.txt", FileAttributes.Hidden)

' 6.txt temp c:

Debug.WriteLine(File.GetAttributes("c:\temp\6.txt"))

' 6.txt temp c:

Debug.WriteLine(File.GetCreationTime("c:\temp\6.txt"))

' 6.txt temp c:

Debug.WriteLine(File.GetLastAccessTime("c:\temp\6.txt"))

' 6.txt temp c:

File.SetLastWriteTime("c:\temp\6.txt", #11/21/2004 10:42:00 PM#)

' 6.txt temp c:

Debug.WriteLine(File.GetLastWriteTime("c:\temp\6.txt"))

End Sub

: SetAttributes

(, ), GetAttributes .

. Directory:

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

' temp c: 444:

Directory.CreateDirectory("c:\temp\444")

' temp c: 444, :

Directory.Delete("c:\temp\444")