Retrieves or sets directory attributes such as read-only and hidden.
[Visual Basic] Overridable Public Property Attributes As FileSystemAttributes [C#] public FileSystemAttributes Attributes {override get; override set;} [C++] public: __property virtual FileSystemAttributes get_Attributes(); public: __property virtual void set_Attributes(FileSystemAttributes); [JScript] public function get Attributes() : FileSystemAttributes; public function set Attributes(FileSystemAttributes);
ReadOnly = 0x1
Hidden = 0x2
Exception Type | Condition |
---|---|
ArgumentNullException | path is null. |
DirectoryNotFoundException | The path is not found. |
SecurityException | The caller does not have the required permission. |
ArgumentException | The file attribute is invalid. |
As defined in WinNT.h (FILE_ATTRIBUTE_XXX)
NGWS Runtime Security:
FileIOPermissionAccess | Write flag required for write permission to the path. |