Windows有像Linux一样的Inode数字吗? [英] Does Windows have Inode Numbers like Linux?
问题描述
使用的术语与您在Unix世界中找到的有所不同,然而就具有唯一标识一个文件的整数而言,NTFS和一些Windows API暴露了类似的文件ID的概念。
您可以查询文件经由 开放手柄的ID GetFileInformationByHandle
。参见 nFileIndexHigh
, nFileIndexLow
;这是64位的文件ID的高和低部分。
NtCreateFile
也可以通过它的ID打开一个文件。请参阅 FILE_OPEN_BY_FILE_ID
标志。您需要通过文件ID打开卷处理。
Does Windows have Inode Numbers like Linux? How does Windows internally manage files?
The terminology used is a bit different from what you'd find in the Unix world, however in terms of having an integer that uniquely identifies a file, NTFS and some Windows API expose the concept of "file IDs" which is similar.
You can query the file ID of an open handle via GetFileInformationByHandle
. See nFileIndexHigh
, nFileIndexLow
; this is the high and low parts respectively of the file ID which is 64 bits.
NtCreateFile
can also open a file by its ID. See the FILE_OPEN_BY_FILE_ID
flag. You need a volume handle to open by file ID.
这篇关于Windows有像Linux一样的Inode数字吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!