Xceed .NET Libraries Documentation
Attributes Property (FileSystemItem)


Xceed.FileSystem Assembly > Xceed.FileSystem Namespace > FileSystemItem Class : Attributes Property
Gets or sets the attributes of the item.
Syntax
'Declaration
 
Public Property Attributes As FileAttributes
'Usage
 
Dim instance As FileSystemItem

Dim value As FileAttributes

 

instance.Attributes = value

 

value = instance.Attributes
public FileAttributes Attributes {get; set;}

Property Value

A combination of System.IO.FileAttributes values that represents the attributes of the item.
Remarks

When changing the item's attributes through this property, the physical item is immediately modified if it exists. If it does not exist, the attributes are cached and will be applied whenever this item is created.

If HasAttributes returns false, the getter returns System.IO.FileAttributes.Normal and System.IO.FileAttributes.Directory while the setter throws a FileSystemNotSupportedException.

Keep in mind that even if HasAttributes returns true, it is not guaranteed that all the attributes are supported. The non-supported attributes will simply be ignored.

Refresh should be called before accessing this property, or the information returned could be outdated.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FileSystemItem Class
FileSystemItem Members