FileStream is opened for FileAccess.Write FileShare.None (default) and is positioned at the end (because of FileMode.Append) : File Access Mode « File Directory Stream « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Net.Mail;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Text;

public class MainClass
{
    public static void Main()
    {
        using (FileStream fs2 = File.Open("c:\\test.txt", FileMode.Append, FileAccess.Write))
        {

        }

    }
}








15.9.File Access Mode
15.9.1.FileStream is opened for FileAccess.ReadWrite (default) and FileShare.None (default)
15.9.2.FileStream is opened for FileAccess.Write FileShare.None (default) and is positioned at the end (because of FileMode.Append)
15.9.3.FileStream is opened for FileAccess.ReadWrite FileShare.Read and has had its entire contents truncated (due to FileMode.Truncate)
15.9.4.Use FileStream with StreamWriter to provide a greater degree of control in how you open the file
15.9.5.Creates a file with read-write access that allows others to read
15.9.6.Create FileStream from FileInfo with file mode, file access and file sharing