Windows apps
Collapse the table of content
Expand the table of content

FileAttributes Enumeration

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Provides attributes for files and directories.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  System.IO
Assembly:  System.IO (in System.IO.dll)

public enum FileAttributes

Member nameDescription
ReadOnlyThe file is read-only.
HiddenThe file is hidden, and thus is not included in an ordinary directory listing.
SystemThe file is a system file. That is, the file is part of the operating system or is used exclusively by the operating system.
DirectoryThe file is a directory.
ArchiveThe file is a candidate for backup or removal.
NormalThe file is a standard file that has no special attributes. This attribute is valid only if it is used alone.

You can get attributes for files and directories by calling the GetAttributes method, and you can set them by calling the SetAttributes method.

© 2017 Microsoft