PowerShell: File Attributes Object Type
Object type of file Attribute
File attribute is of the .net type
System.IO.FileAttributes
- Type of File object is
System.IO.FileInfo
- Type of Dir object is
System.IO.DirectoryInfo
- File or Dir object has a property named
Attributes
, and type of its value isSystem.IO.FileAttributes
- The object of type
System.IO.FileAttributes
, has properties namedCompressed
,Hidden
,ReadOnly
,System
, etc., and their type isstatic
〔see Object Type, Properties, Methods〕
# list properties of a file Get-ItemProperty .\Documents\ | Get-Member -MemberType Properties # one of the property is # Attributes Property System.IO.FileAttributes Attributes {get;set;}