File: GetAttributes

GetAttributes

Returns the file attributes (ReadOnly, Hidden, ...)



 Public Function GetAttributes(
	  ByRef Path As String ) As FileAttributes

Parameters

Path
[ByRef] String. The file to retrieve the attributes for.

Return Values

FileAttributes -  A value with individual bits representing if an attribute is applied to the file.

Remarks

To determine if a specific attribute is being used, the return value will need to be ANDed with the specific FileAttributes flag.

 If Attr And FileAttributes.ReadOnly Then
     '... file is readonly
 End If
 

See Also

Project CorLib Overview

Class File Overview