public Win32StreamInfo(FileStreamType type, FileStreamAttributes attributes, Int64 size, String name) { StreamType = type; StreamAttributes = attributes; StreamSize = size; StreamName = name; }
/// <summary> /// Initializes a new instance of the <see cref="AlternateDataStreamInfo"/> class. /// </summary> /// <param name="filePath"> /// The full path of the file. /// This argument must not be <see langword="null"/>. /// </param> /// <param name="info"> /// The <see cref="SafeNativeMethods.Win32StreamInfo"/> containing the stream information. /// </param> internal AlternateDataStreamInfo(string filePath, SafeNativeMethods.Win32StreamInfo info) { _filePath = filePath; _streamName = info.StreamName; _streamType = info.StreamType; _attributes = info.StreamAttributes; _size = info.StreamSize; _exists = true; _fullPath = SafeNativeMethods.BuildStreamPath(_filePath, _streamName); }
/// <summary> /// Initializes a new instance of the <see cref="AlternateDataStreamInfo"/> class. /// </summary> /// <param name="path"> /// The full path of the file. /// This argument must not be <see langword="null"/>. /// </param> /// <param name="info">stream info</param> internal AlternateDataStreamInfo(String path, Win32StreamInfo info) { Path = path; Name = info.StreamName; StreamType = info.StreamType; Attributes = info.StreamAttributes; Size = info.StreamSize; Exists = true; FullPath = PathUtils.BuildStreamPath(Path, Name); }
public static string FileStreamAttributes2String(FileStreamAttributes attr) { switch (attr) { case FileStreamAttributes.CONTAINS_PROPERTIES: return("Properties"); case FileStreamAttributes.CONTAINS_SECURITY: return("Security"); case FileStreamAttributes.MODIFIED_WHEN_READ: return("Modified when read"); case FileStreamAttributes.NORMAL: return("Normal"); case FileStreamAttributes.SPARSE: return("Sparse"); default: return("Unknown attribute"); } }