Name
FileAttributes
Synopsis
This enumeration represents the various attributes a file can have in the .NET environment; many, if not most, of these attributes parallel the standard Win32 filesystem attributes of the same name.
public enum FileAttributes { ReadOnly = 0x00000001, Hidden = 0x00000002, System = 0x00000004, Directory = 0x00000010, Archive = 0x00000020, Device = 0x00000040, Normal = 0x00000080, Temporary = 0x00000100, SparseFile = 0x00000200, ReparsePoint = 0x00000400, Compressed = 0x00000800, Offline = 0x00001000, NotContentIndexed = 0x00002000, Encrypted = 0x00004000 }
Hierarchy
System.Object
→
System.ValueType
→
System.Enum(System.IComparable, System.IFormattable
,
System.IConvertible)
→
FileAttributes
Returned By
File.GetAttributes( )
,
FileSystemInfo.Attributes
Passed To
File.SetAttributes( )
,
FileSystemInfo.Attributes
Get C# in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.