VB.Net Tutorial/Stream File/File

Материал из VB Эксперт
Перейти к: навигация, поиск

File Creation, Last Write and Last Access time

Imports System.IO
Public Class Tester
    Public Shared Sub Main
    
         Console.WriteLine(File.GetCreationTime("test.vb"))
         Console.WriteLine(File.GetLastWriteTime("test.vb"))
         Console.WriteLine(File.GetLastAccessTime("test.vb"))
    End Sub
End Class
10/05/2007 5:05:34 PM
10/05/2007 8:20:48 PM
10/05/2007 8:20:44 PM

File Exists

Imports System.IO
Public Class Tester
    Public Shared Sub Main
    
         Console.WriteLine(File.Exists("test.vb"))

    End Sub
End Class
True