/// <summary> /// Initializes new instance and intializes new system file stream. /// </summary> /// <param name="path">Path to file.</param> /// <param name="mode">File mode.</param> /// <param name="access">File access.</param> /// <param name="bSize">Buffer size.</param> /// <param name="share">Sharing permissions.</param> public FileStream(string path, FileMode mode, FileAccess access, FileShare share, int bSize) : base(path) { _path = path; _fileMode = mode; _fileAccess = access; _fileShare = share; _bufferSize = bSize; InitFileStream(); }
/// <summary> /// Initializes new instance and intializes new system file stream. /// </summary> /// <param name="path">Path to file.</param> /// <param name="mode">File mode.</param> /// <param name="access">File access.</param> public FileStream(string path, FileMode mode, FileAccess access) : this(path, mode, access, FileShare.Read) { }
/// <summary> /// Initializes new instance and intializes new system file stream. /// </summary> /// <param name="path">Path to file.</param> /// <param name="mode">File mode.</param> /// <param name="access">File access.</param> /// <param name="share">Sharing permissions.</param> public FileStream(string path, FileMode mode, FileAccess access, FileShare share) : this(path, mode, access, share, 0x1000) { }
/// <summary> /// Initializes new instance and intializes new system file stream. /// </summary> /// <param name="path">Path to file.</param> /// <param name="mode">File mode.</param> public FileStream(string path, FileMode mode) : this(path, mode, mode == FileMode.Append ? FileAccess.Write : FileAccess.ReadWrite) { }