FileAttribute Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Indicates the file attributes to use when calling file-access functions.
This enumeration supports a bitwise combination of its member values.
public enum class FileAttribute
[System.Flags]
public enum FileAttribute
[<System.Flags>]
type FileAttribute =
Public Enum FileAttribute
- Inheritance
- Attributes
Fields
Name | Value | Description |
---|---|---|
Normal | 0 | Normal (default for |
ReadOnly | 1 | Read only. This member is equivalent to the Visual Basic constant |
2 | Hidden. This member is equivalent to the Visual Basic constant |
|
System | 4 | System file. This member is equivalent to the Visual Basic constant |
Volume | 8 | Volume label. This attribute is not valid when used with |
Directory | 16 | Directory or folder. This member is equivalent to the Visual Basic constant |
Archive | 32 | File has changed since last backup. This member is equivalent to the Visual Basic constant |
Remarks
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 .