Attributes Property
See Also 
Xceed.FileSystem Assembly > Xceed.FileSystem Namespace > FileSystemItem Class : Attributes Property


Gets or sets the attributes of the item.

Syntax

Visual Basic (Declaration) 
Public Property Attributes As FileAttributes
Visual Basic (Usage)Copy Code
Dim instance As FileSystemItem
Dim value As FileAttributes
 
instance.Attributes = value
 
value = instance.Attributes
C# 
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.

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

Requirements

Target Platforms: Windows 2000, Windows XP SP3 Family, Windows Server 2003-2008 Family, Windows Vista, Windows 7

See Also