[求助]FileId能否作为文件唯一标识符?
minifilter里面,有时候会遇到短路径的情况。然而内核里面长短路径转换挺麻烦的。所以就找了一下,FILE_INTERNAL_INFORMATION 此结构的成员,跟FILE_ID_BOTH_DIR_INFORMATION结构里的FileId代表同一个含义。那么此FileId能否作为文件唯一标识符。若不能,在何种情况下此成员才能作为文件唯一标识符? File reference numbers, also called file IDs, are guaranteed to be unique only within a static file system. They are not guaranteed to be unique over time, because file systems are free to reuse them. Nor are they guaranteed to remain constant. For example, the FAT file system generates the file reference number for a file from the byte offset of the file's directory entry record (DIRENT) on the disk. Defragmentation can change this byte offset. Thus a FAT file reference number can change over time.)参阅:https://msdn.microsoft.com/en-us/library/ff540303 Tesla.Angela 发表于 2017-8-23 16:42参阅:https://msdn.microsoft.com/en-us/library/ff540303
也就是说,如果对文件进行重命名、删除等操作,FileId是不会改变的? flac 发表于 2017-8-23 18:17
也就是说,如果对文件进行重命名、删除等操作,FileId是不会改变的?
FileId会不会改变,我说了不算数,实践出真知。
页:
[1]