如何检查文件是否具有备用数据流? [英] How to check if a file has Alternate Data Streams?
问题描述
Delphi中是否可以检查文件是否具有任何备用数据流?
看看Win32 API FindFirstStreamW()
和 FindNextStreamW ()
函数:
用
枚举第一个流: :$ DATA
在指定文件或目录中的流类型。
继续从先前调用
FindFirstStreamW
函数开始的流搜索。
但是,文件或目录可能具有 :: $ DATA
以外的其他流类型,这些类型在Win32 API,它们是NTFS本身的内部。
有关更多详细信息,请参见MSDN。
>要枚举非 $ DATA
流,您必须阅读直接使用文件系统,例如使用 BackupRead( )
和 BackupSeek()
。有关详细信息,请参见CodeProject上的枚举备用数据流。 / p>
Is there a way in Delphi to check if a file has any Alternate Data Streams?
Have a look at the Win32 API FindFirstStreamW()
and FindNextStreamW()
functions:
Enumerates the first stream with a
::$DATA
stream type in the specified file or directory.
Continues a stream search started by a previous call to the
FindFirstStreamW
function.
However, a file or directory may have other stream types besides ::$DATA
, which are not enumerable in the Win32 API, they are internal to NTFS itself.
See MSDN for more details.
To enumerate non-$DATA
streams, you would have to read the filesystem directly, such as with BackupRead()
and BackupSeek()
. See Enumerating Alternate Data Streams on CodeProject for details on that.
这篇关于如何检查文件是否具有备用数据流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!