FileInfo.IsReadOnly, FileAttributes.Hidden : FileInfo « Stream File « VB.Net Tutorial






Public Class Tester
    Public Shared Sub Main
    
        Dim fileDetail As IO.FileInfo = My.Computer.FileSystem.GetFileInfo("test.txt")
        Console.WriteLine(fileDetail.IsReadOnly)
        Console.WriteLine(CBool(fileDetail.Attributes And IO.FileAttributes.Hidden))
    End Sub

End Class
False
False








13.4.FileInfo
13.4.1.My.Computer.FileSystem.GetFileInfo(''File Name'')
13.4.2.FileInfo.IsReadOnly, FileAttributes.Hidden
13.4.3.Set file attributes: Hidden, ReadOnly
13.4.4.Get File Attributes as a string
13.4.5.Get file Creation Time, Last Access Time and Modified Time
13.4.6.Get file size
13.4.7.Get file extension name