System.IO.FileStream.InternalAppend C# (CSharp) Method

InternalAppend() static private method

static private InternalAppend ( string path, int bufferSize = DefaultBufferSize, bool useAsync = DefaultIsAsync ) : FileStream
path string
bufferSize int
useAsync bool
return FileStream
        internal static FileStream InternalAppend(string path, int bufferSize = DefaultBufferSize, bool useAsync = DefaultIsAsync)
        {
            return new FileStream(path, FileMode.Append, FileAccess.Write, FileShare.Read, bufferSize, useAsync);
        }

Usage Example

Example #1
0
        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);
        }
All Usage Examples Of System.IO.FileStream::InternalAppend