Imports/Trinet.Core.IO.Ntfs/Source/StreamName.cs
/// <summary>
/// Reads the string, and extracts the stream name.
/// </summary>
/// <param name="length">
/// The length of the string to read, in characters.
/// </param>
/// <returns>
/// The stream name.
/// </returns>
Reads the string, and extracts the stream name.
Reads the string and extracts the stream name .
public string ReadStreamName(int length)
		{
			string name = this.ReadString(length);
			if (!string.IsNullOrEmpty(name))
			{
				int separatorIndex = name.IndexOf(SafeNativeMethods.StreamSeparator, 1);
				if (-1 != separatorIndex)
				{
					name = name.Substring(1, separatorIndex - 1);
				}
				else
				{
					separatorIndex = name.IndexOf('\0');
					if (1 < separatorIndex)
					{
						name = name.Substring(1, separatorIndex - 1);
					}
					else
					{
						name = null;
					}
				}
			}
			return name;
		}
public string ReadStreamName ( int length ) { string name = this . ReadString ( length ) ; if ( ! string . IsNullOrEmpty ( name ) ) { int separatorIndex = name . IndexOf ( SafeNativeMethods . StreamSeparator , 1 ) ; if ( - 1 != separatorIndex ) { name = name . Substring ( 1 , separatorIndex - 1 ) ; } else { separatorIndex = name . IndexOf ( ' \0 ' ) ; if ( 1 < separatorIndex ) { name = name . Substring ( 1 , separatorIndex - 1 ) ; } else { name = null ; } } } return name ; }
Reads the string, and extracts the stream name.
Reads the string and extracts the stream name .
// Name is of the format ":NAME:$DATA\0" // Should never happen!
The stream name.
The stream name .
length
int
The length of the string to read, in characters.
The length of the string to read in characters .