文件属性的修改


PowerShell交流中心分类: Powershell基础文件属性的修改
0
菠萝小草莓 asked 6 年 ago

https://blogs.technet.microsoft.com/heyscriptingguy/2011/01/26/use-a-powershell-cmdlet-to-work-with-file-attributes/
我在阅读这篇POWERSHELL修改文件属性,在找到修改方法后
Attributes        Property   System.IO.FileAttributes Attributes {get;set;}
这行是啥意思?
还有 [System.Io.FileAttributes] 这个是什么用法?

PS C:\> [enum]::GetValues([system.io.fileattributes])这个又是啥?

1 Answers
0
Mooser Lee 管理员 answered 6 年 ago

这是直接在PowerShell调用.NET 的方法,[enum]::GetValues([system.io.fileattributes])是列出所有文件属性的枚举值。