FileInfoExtensionsGetAlternateDataStream Method
Gets the data of a specific alternate data stream (ADS) from the specified file.
Namespace: DevCase.Extensions.FileInfoExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static byte[] GetAlternateDataStream(
this FileInfo file,
string streamName
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function GetAlternateDataStream (
file As FileInfo,
streamName As String
) As Byte()
Dim file As FileInfo
Dim streamName As String
Dim returnValue As Byte()
returnValue = file.GetAlternateDataStream(streamName)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static array<unsigned char>^ GetAlternateDataStream(
FileInfo^ file,
String^ streamName
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member GetAlternateDataStream :
file : FileInfo *
streamName : string -> byte[]
No code example is currently available or this language may not be supported.
- file FileInfo
-
The source FileInfo.
- streamName String
-
The name of the alternate data stream.
Byte
The resulting alternate data stream.
In Visual Basic and C#, you can call this method as an instance method on any object of type
FileInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Dim file As New FileInfo("C:\test.txt")
Dim rawData As Byte() = file.GetAlternateDataStream(":$DATA")
Dim valueString As String = Encoding.Default.GetString(rawData)
Console.WriteLine(valueString)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.