Export (0) Print
Expand All

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.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

[FlagsAttribute]
public enum FileAttribute

Member nameDescription
NormalNormal (default for Dir and SetAttr). No special characteristics apply to this file. This member is equivalent to the Visual Basic constant vbNormal.
ReadOnlyRead only. This member is equivalent to the Visual Basic constant vbReadOnly.
HiddenHidden. This member is equivalent to the Visual Basic constant vbHidden.
SystemSystem file. This member is equivalent to the Visual Basic constant vbSystem.
VolumeVolume label. This attribute is not valid when used with SetAttr. This member is equivalent to the Visual Basic constant vbVolume.
DirectoryDirectory or folder. This member is equivalent to the Visual Basic constant vbDirectory.
ArchiveFile has changed since last backup. This member is equivalent to the Visual Basic constant vbArchive.

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 FileSystem .

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft