NTFS 文件系统中 $FILE_NAME 属性的结构 [英] Structure of $FILE_NAME attribute in NTFS file system

查看:32
本文介绍了NTFS 文件系统中 $FILE_NAME 属性的结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读有关 NTFS 属性类型的信息,它涉及到 $FILE_NAME 属性结构.这是:

I'm reading about the NTFS attribute types and it come to the $FILE_NAME attribute structure. Here it is:

Offset Size Description
~      ~    Standard Attribute Header
0x00   8    File reference to the parent directory.
0x08   8    C Time - File Creation
0x10   8    A Time - File Altered
0x18   8    M Time - MFT Changed
0x20   8    R Time - File Read
0x28   8    Allocated size of the file
0x30   8    Real size of the file
0x38   4    Flags, e.g. Directory, compressed, hidden
0x3c   4    Used by EAs and Reparse
0x40   1    Filename length in characters (L)
0x41   1    Filename namespace
0x42   2L   File name in Unicode (not null terminated)

偏移 0x41 处的文件名命名空间"是什么?我认为我对命名空间有所了解.它如何仅存储在 1 个字节中?任何人都可以为我清除这个吗?谢谢.

What is "Filename Namespace" at the offset 0x41? I know a little about namespace i think. How can it be stored in just 1 byte? Can anyone clear this for me? Thank you.

推荐答案

它描述了文件名的特征",即长度、允许的字符等.它本身不是字符串"(如 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.

这篇关于NTFS 文件系统中 $FILE_NAME 属性的结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆