internal static FileStream InternalAppend(string path, int bufferSize = DefaultBufferSize, bool useAsync = DefaultIsAsync) { return new FileStream(path, FileMode.Append, FileAccess.Write, FileShare.Read, bufferSize, useAsync); }
private static void InternalAppendAllText(String path, String contents, Encoding encoding) { Contract.Requires(path != null); Contract.Requires(encoding != null); Contract.Requires(path.Length > 0); Stream stream = FileStream.InternalAppend(path, useAsync: false); using (StreamWriter sw = new StreamWriter(stream, encoding)) sw.Write(contents); }