FileAttribute Enumeration
Indicates the file attributes to use when calling file-access functions.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Namespace: Microsoft.VisualBasicAssembly: Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
| Member name | Description | |
|---|---|---|
![]() | Normal | Normal (default for Dir and SetAttr). No special characteristics apply to this file. This member is equivalent to the Visual Basic constant vbNormal. |
![]() | ReadOnly | Read only. This member is equivalent to the Visual Basic constant vbReadOnly. |
![]() | Hidden | Hidden. This member is equivalent to the Visual Basic constant vbHidden. |
![]() | System | System file. This member is equivalent to the Visual Basic constant vbSystem. |
![]() | Volume | Volume label. This attribute is not valid when used with SetAttr. This member is equivalent to the Visual Basic constant vbVolume. |
![]() | Directory | Directory or folder. This member is equivalent to the Visual Basic constant vbDirectory. |
![]() | Archive | File has changed since last backup. This member is equivalent to the Visual Basic constant vbArchive. |
For more detailed information, see the Visual Basic topic FileAttribute Enumeration.
When you call the Dir, GetAttr, or SetAttr functions, you can use the FileAttribute enumeration in your code in place of the actual values.
The Attributes argument takes the FileAttribute enumeration members.
When performing file I/O operations, the My.Computer.FileSystem object provides greater performance and ease of use than legacy file I/O methods. For more information, see My.Computer.FileSystem Object.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
