How can I check if a file has alternate data streams?

Is there a way in Delphi to check if a file has any alternate data streams?

+3


source to share


1 answer


Look at the Win32 API FindFirstStreamW()

and FindNextStreamW()

:

Enumerates the first stream of stream type ::$DATA

in the specified file or directory.

Continues the search for the stream started by the previous function call FindFirstStreamW

.

However, the file or directory may have other stream types besides ::$DATA

those not listed in the Win32 API, they are internal to NTFS itself.



See MSDN for details.

Using streams

File streams

To list streams not $DATA

, you would need to read the filesystem directly, like BackupRead()

and BackupSeek()

. See Enumerating Alternate Data Streams in CodeProject for details .

+5


source







All Articles