且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

NTFS 文件系统中 $FILE_NAME 属性的结构

更新时间:2023-09-19 10:10:04

它描述了文件名的特征",即长度、允许的字符等.它本身不是字符串"(如 C++/C#/etc. 命名空间).

It describes the "traits" of a filename, i.e. length, allowable characters, etc. It is not a "string" in itself (like a C++/C#/etc. namespace).

我在这里找到了一个文档,坦白说我不知道其有效性.

I found a document here, of which I have frankly no idea of its validity.

但无论如何,它描述了命名空间(这使得它非常明显,请参阅第 13.2 章.):

But anyway, it describes the namespaces as such (which makes it quite obvious, see chapter 13.2.):

0:POSIX

这是最大的命名空间.它区分大小写并且允许除 NULL (0) 和正斜杠之外的所有 Unicode 字符'/'.最大名称长度为 255 个字符.注意有一些字符,例如冒号:",在 NTFS 中有效,但 Windows 将不允许你使用.

This is the largest namespace. It is case sensitive and allows all Unicode characters except for NULL (0) and Forward Slash '/'. The maximum name length is 255 characters. N.B. There are some characters, e.g. Colon ':', which are valid in NTFS, but Windows will not allow you to use.

1:Win32

Win32 是 POSIX 的一个子集命名空间并且不区分大小写.它使用所有 Unicode 字符,除了:'"' '*' '/' ':' '<''>' '?'\' '|'注意:名称不能以点."或空格".

Win32 is a subset of the POSIX namespace and is case insensitive. It uses all the Unicode characters, except: '"' '*' '/' ':' '<' '>' '?' '\' '|' N.B. Names cannot end with Dot '.', or Space ''.

2:DOS

DOS 是 Win32 命名空间的子集,只允许 8 位大写字符,大于空格 '',和不包括:'"' '*' '+' ',' '/' ':' ';''<''=' '>' '?'\'.注意名称必须匹配以下模式:1 到 8 个字符,然后是.",然后是 1到 3 个字符.

DOS is a subset of the Win32 namespace, allowing only 8 bit upper case characters, greater than Space '', and excluding: '"' '*' '+' ',' '/' ':' ';' '<' '=' '>' '?' '\'. N.B. Names must match the following pattern: 1 to 8 characters, then '.', then 1 to 3 characters.

3:Win32 和 DOS

3: Win32 &DOS

这个命名空间意味着Win32 和 DOS 文件名相同,因此已保存在这个单一的文件名记录.

This namespace means that both the Win32 and the DOS filenames are identical and hence have been saved in this single filename record.

因此该字段可以是一个字节,因为它只包含一个标识正在使用的各个命名空间的数字.

So the field can be one byte, because it just contains a number identifying the respective namespace in use.