public static CreateFileStream ( string path, bool write, bool append ) : |
||
path | string | |
write | bool | |
append | bool | |
return |
public StreamWriter(string path, bool append, Encoding encoding, int bufferSize) { if (path == null) { throw new ArgumentNullException(nameof(path)); } if (encoding == null) { throw new ArgumentNullException(nameof(encoding)); } if (path.Length == 0) { throw new ArgumentException(SR.Argument_EmptyPath); } if (bufferSize <= 0) { throw new ArgumentOutOfRangeException(nameof(bufferSize), SR.ArgumentOutOfRange_NeedPosNum); } Stream stream = FileStreamHelpers.CreateFileStream(path, write: true, append: append); Init(stream, encoding, bufferSize, shouldLeaveOpen: false); }