共用方式為


FileAttribute Enumeration 

Indicates the file attributes to use when calling file-access functions.

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 My.Computer.FileSystem Object.

Members

Member Constant Description

Normal

vbNormal

Normal (default for Dir and SetAttr). No special characteristics apply to this file.

ReadOnly

vbReadOnly

Read only.

Hidden

vbHidden

Hidden.

System

vbSystem

System file.

Volume

vbVolume

Volume label. This attribute is not valid when used with SetAttr.

Directory

vbDirectory

Directory or folder.

Archive

vbArchive

File has changed since last backup.

Smart Device Developer Notes

This enumeration is not supported.

Requirements

Namespace: Microsoft.VisualBasic

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

See Also

Tasks

How to: Refer to an Enumeration Member

Reference

Dir Function
GetAttr Function
SetAttr Function

Concepts

Intrinsic Constants and Enumerations
When to Use an Enumeration