| C# | Visual Basic | Managed C++ |
public static class AlternateStreams
Public NotInheritable Class AlternateStreams
public ref class AlternateStreams abstract sealed
| All Members | Constructors | Methods | Properties | Fields | Events |
| Icon | Member | Description |
|---|---|---|
| DeleteStream(String, String) |
Deletes an alternate stream.
| |
| GetStreamNames(String) |
Returns a string array of the names of all the alternate streams in an NTFS file.
| |
| GetStreamNames(String, Int64[]()) |
Returns a string array of the names of all the alternate streams in an NTFS file.
| |
| OpenStream(String, String) |
Opens an alternate stream or, if it does not exist, creates it, with both read and write access and read-only sharing (other processes may read the stream but not alter it).
| |
| OpenStream(String, String, FileMode) |
Opens or creates an alternate stream with the specified mode, read and write access and read-only sharing (other processes may read the stream but not alter it).
| |
| OpenStream(String, String, FileAccess, FileShare) |
Opens an alternate stream or, if it does not exist, creates it, with the specified access and sharing.
| |
| OpenStream(String, String, FileMode, FileAccess) |
Opens or creates an alternate stream with the specified mode, access, and read-only sharing (other processes may read the stream but not alter it).
| |
| OpenStream(String, String, FileMode, FileAccess, FileShare) |
Opens or creates an alternate stream with the specified mode, access, and sharing.
|
Under NTFS a file has a default "main" stream as well as zero or more "alternate" streams. These can be used to store arbitrary data; one example (that uses Microsoft's proprietary OLE Structured Storage format) is the shell's summary information (viewable in Windows Explorer's Properties dialog under the "Summary" tab), which is stored as an alternate stream named ((char)5 + "SummaryInformation").
When using alternate streams, be aware that if the file is moved to a non-NTFS filesystem, the alternate streams will be permanently lost (there are some exceptions, e.g. an alternate-stream-aware backup application may preserve the streams' data and recreate them when restoring the backup). Additionally, many applications (such as Windows Explorer) will not display a file's alternate streams nor include them when calculating file size, which can be potentially be confusing or misleading for end-users.
| Object | |
| AlternateStreams | |