Sets the specified System.IO.FileAttributes of the file on the specified path.
The path parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see Directory.GetCurrentDirectory.
Certain file attributes, such as FileAttributes.Hidden and FileAttributes.ReadOnly, can be combined. Other attributes, such as FileAttributes.Normal, must be used alone.
It is not possible to change the compression status of a System.IO.File object using the File.SetAttributes(string, FileAttributes) method.
For a list of common I/O tasks, see Common I/O Tasks.