Documentation for this section has not yet been entered.
The value of the FileSystemInfo.Attributes property is pre-cached if the current instance of the System.IO.FileSystemInfo object was returned from any of the following System.IO.DirectoryInfo methods:
To get the latest value, call the FileSystemInfo.Refresh method.
The value of this property is a combination of the archive, compressed, directory, hidden, offline, read-only, system, and temporary file attribute flags.
When you set this value, use the bitwise OR operator (| in C# or Or in Visual Basic) to apply more than one value. To retain any existing values in the FileSystemInfo.Attributes property, include the value of the FileSystemInfo.Attributes property in your assignment. For example:
exampleFile.Attributes = exampleFile.Attributes | FileAttributes.ReadOnly;