Method filesystem.setAttributes
Overload
Sets file or directory attributes.
public static bool setAttributes(string path, FileAttributes attributes, bool? add = null, FAFlags flags = 0)
Parameters
|
path (string)
Full path. Supports |
|
attributes (FileAttributes)
Attributes to set, add or remove. |
|
add (bool?)
|
|
flags (FAFlags)
Enum: UseRawPath, DontThrow. |
Returns
|
bool
|
Exceptions
|
ArgumentException
Not full path (when not used flag |
|
AuException
Failed. Not thrown if used flag |
Remarks
Calls API SetFileAttributes. For NTFS links, sets attributes of the link, not of its target.