/// <summary> /// Initializes new instance and initializes 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, CMS.IO.FileMode mode, CMS.IO.FileAccess access, CMS.IO.FileShare share, int bSize) : base(path) { this.mPath = path; this.fileMode = mode; this.fileAccess = access; this.fileShare = share; this.bufferSize = bSize; this.InitFileStream(); }
/// <summary>Returns new instance of FileStream class.</summary> /// <param name="path">Path.</param> /// <param name="mode">File mode.</param> /// <param name="access">File access.</param> protected virtual CMS.IO.FileStream GetFileStream(string path, CMS.IO.FileMode mode, CMS.IO.FileAccess access) { return(new FileStream(path, mode, access)); }
/// <summary>Returns new instance of FileStream class.</summary> /// <param name="path">Path.</param> /// <param name="mode">File mode.</param> protected virtual CMS.IO.FileStream GetFileStream(string path, CMS.IO.FileMode mode) { return(new FileStream(path, mode)); }
/// <summary> /// Opens a FileStream on the specified path, with the specified mode and access. /// </summary> /// <param name="path">Path to file.</param> /// <param name="mode">File mode.</param> /// <param name="access">File access.</param> public override CMS.IO.FileStream Open(string path, CMS.IO.FileMode mode, CMS.IO.FileAccess access) { return(new FileStream(path, mode, access)); }
/// <summary> /// Initializes new instance and initializes 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, CMS.IO.FileMode mode, CMS.IO.FileAccess access, CMS.IO.FileShare share) : this(path, mode, access, share, 4096) { }
/// <summary> /// Initializes new instance and initializes 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, CMS.IO.FileMode mode, CMS.IO.FileAccess access) : this(path, mode, access, CMS.IO.FileShare.Read) { }
/// <summary> /// Initializes new instance and initializes new system file stream. /// </summary> /// <param name="path">Path to file.</param> /// <param name="mode">File mode.</param> public FileStream(string path, CMS.IO.FileMode mode) : this(path, mode, mode == CMS.IO.FileMode.Append ? CMS.IO.FileAccess.Write : CMS.IO.FileAccess.ReadWrite) { }