1 2 3 4 5 6
Public Function IsAttributeGiven(ByVal FileName As String, ByVal CheckAttribute As FileAttribute) As Boolean Dim Attr As FileAttributes Attr = File.GetAttributes(FileName) If (Attr And CheckAttribute) = CheckAttribute Then Return True End Function