FileSystemAttributes class
这是一个帮助程序类,用于构造表示文件或目录的 NTFS 属性的字符串。
请参阅 https://free.blessedness.top/rest/api/storageservices/create-file#file-system-attributes
属性
| archive | 指定目录或文件是存档。 应用程序通常使用此属性标记文件以供备份或删除。 |
| directory | 指定句柄标识目录。 |
| hidden | 指定隐藏目录或文件。 |
| none | 指定未设置其他属性的目录或文件。 此属性仅在单独使用时才有效。 |
| no |
指定要由后台数据完整性扫描程序读取的用户数据流。 此文件系统属性主要用于提供与 Windows 的兼容性。 适用于目录或文件。 |
| not |
指定目录或文件不由内容索引服务编制索引。 |
| offline | 指定目录或文件的数据不能立即可用。 此文件系统属性主要用于提供与 Windows 的兼容性 - Azure 文件存储不支持脱机存储选项。 |
| readonly | 指定只读的目录或文件。 |
| system | 指定作系统使用部分或独占使用的目录或文件。 |
| temporary | 指定文件是否为临时文件。 |
方法
| parse(string) | 从指定的属性字符串创建 FileSystemAttributes。 如果遇到与有效属性不对应的字符串,此方法将引发错误。 |
| to |
将给定属性转换为字符串。 |
属性详细信息
archive
指定目录或文件是存档。 应用程序通常使用此属性标记文件以供备份或删除。
archive: boolean
属性值
boolean
directory
指定句柄标识目录。
directory: boolean
属性值
boolean
hidden
指定隐藏目录或文件。
hidden: boolean
属性值
boolean
none
指定未设置其他属性的目录或文件。 此属性仅在单独使用时才有效。
none: boolean
属性值
boolean
noScrubData
指定要由后台数据完整性扫描程序读取的用户数据流。 此文件系统属性主要用于提供与 Windows 的兼容性。 适用于目录或文件。
noScrubData: boolean
属性值
boolean
notContentIndexed
指定目录或文件不由内容索引服务编制索引。
notContentIndexed: boolean
属性值
boolean
offline
指定目录或文件的数据不能立即可用。 此文件系统属性主要用于提供与 Windows 的兼容性 - Azure 文件存储不支持脱机存储选项。
offline: boolean
属性值
boolean
readonly
指定只读的目录或文件。
readonly: boolean
属性值
boolean
system
指定作系统使用部分或独占使用的目录或文件。
system: boolean
属性值
boolean
temporary
指定文件是否为临时文件。
temporary: boolean
属性值
boolean
方法详细信息
parse(string)
从指定的属性字符串创建 FileSystemAttributes。 如果遇到与有效属性不对应的字符串,此方法将引发错误。
static function parse(fileAttributes: string): FileSystemAttributes
参数
- fileAttributes
-
string
标头 x-ms-file-attributes 的值。
返回
toString()
将给定属性转换为字符串。
function toString(): string
返回
string
表示 FileSystemAttributes 的字符串