adrianbanks
adrianbanks

Reputation: 82944

Accessing alternate data streams in files

On an NTFS file system, it is possible to have alternate data streams within a single file. Is it possible to access this information in a fully managed way?

EDIT: additionally, I want to read from the alternate stream in an existing file. How is this achieved (using PInvoke if not possible using managed code only)?

This question is similar, but is from early 2009 and the .Net answer uses PInvoke to write to a file, not read from it. Has support for this been added since then (to .Net 4.0?) that can do it without using PInvoke?

Upvotes: 1

Views: 3274

Answers (1)

Tim Lloyd
Tim Lloyd

Reputation: 38444

Unfortunately no, there is still no access via a managed .Net Framework API.

Update

Here's a library\source for an ADS access wrapper:

http://www.codeproject.com/KB/cs/ntfsstreams.aspx

Upvotes: 4

Related Questions