Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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
/** @attribute FlagsAttribute() */ 
public enum FileAttribute
FlagsAttribute 
public enum FileAttribute
 Member nameDescription
Supported by the .NET Compact FrameworkArchiveFile has changed since last backup. This member is equivalent to the Visual Basic constant vbArchive
Supported by the .NET Compact FrameworkDirectoryDirectory or folder. This member is equivalent to the Visual Basic constant vbDirectory
Supported by the .NET Compact FrameworkHiddenHidden. This member is equivalent to the Visual Basic constant vbHidden
Supported by the .NET Compact FrameworkNormalNormal (default for Dir and SetAttr). No special characteristics apply to this file. This member is equivalent to the Visual Basic constant vbNormal
Supported by the .NET Compact FrameworkReadOnlyRead only. This member is equivalent to the Visual Basic constant vbReadOnly
Supported by the .NET Compact FrameworkSystemSystem file. This member is equivalent to the Visual Basic constant vbSystem
Supported by the .NET Compact FrameworkVolumeVolume label. This attribute is not valid when used with SetAttr. This member is equivalent to the Visual Basic constant vbVolume

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 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.