DSOFile.OleDocumentProperties.Save是否修改文件? [英] Does DSOFile.OleDocumentProperties.Save modify file?

查看:189
本文介绍了DSOFile.OleDocumentProperties.Save是否修改文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

DSOFile.OleDocumentProperties.Save修改与NTFS上的文件关联的元数据.

DSOFile.OleDocumentProperties.Save modifies metadata associated to a file on NTFS.

它是否修改文件本身,这意味着校验和将更改?
还是仅修改有关该文件的某些NTFS元数据,但校验和将保持不变?

Does it modify the file itself, meaning that the checksum will change?
Or does it only modify some NTFS metadata about the file, but the checksum will remain the same?

有关DSOFile的更多信息: KB

More about DSOFile: KB, Technet

信用:这实际上是Ilmo在此问题中的一种自我审问..

Credit: It was actually a self-interrogation by Ilmo within this question.

推荐答案

这取决于文件格式和文件所在的文件系统.

It depends on the file format and the file system where the file is located.

如果文件是OLE格式,则文件本身将被修改,因为属性包含在文件中.这将导致文件数据被修改,并且其大小可能会更改.在更改其中一个属性之前和之后,任何文件哈希生成器(例如CRC,MD5,SHA1等)都会产生不同的结果.

If the file is an OLE format, the file itself will be modified since the properties are contained in the file. This will cause the file data to be modified and its size may change. Any file hash generator (such as CRC, MD5, SHA1, etc.) would produce different result, before and after one of the property is changed.

如果文件不是OLE格式,则所有属性将保存在一个或多个NTFS文件流中,这些流在物理上与文件数据分开.这将导致文件的上次修改时间发生变化,但不会导致文件数据被修改或大小改变.假设程序未考虑文件的上次修改时间及其文件流,则在更改其中一个属性之前和之后,文件哈希生成器将产生相同的结果.如果使用非NTFS文件系统,则OLE文档属性不适用于所有文件.

If the file is not an OLE format, all properties will be saved in one or more NTFS file streams, which are physically separate from the file data. This will cause a change on the file's last modification time, but it will not cause the file data to be modified nor changed in size. File hash generator would produce the same result, before and after one of the property is changed, assuming that the program does not take the file's last modification time and its file streams into account. In case of non NTFS file system, OLE document properties is not applicable on all files.

这篇关于DSOFile.OleDocumentProperties.Save是否修改文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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