/// Opens a text file, reads all lines of the file, and then closes the file.
/// </summary>
/// <param name="path">The file to open for reading.</param>
/// <param name="encoding">Encoding of the file. Default is UTF8</param>
/// <param name="fileMode">Specifies how the operating system should open a file. Default is Open</param>
/// <param name="fileAccess">Defines constants for read, write, or read/write access to a file. Default is Read</param>
/// <param name="fileShare">Contains constants for controlling the kind of access other FileStream objects can have to the same file. Default is Read</param>
/// <param name="bufferSize">Length of StreamReader buffer. Default is 4096.</param>
/// <param name="fileOptions">Indicates FileStream options. Default is Asynchronous (The file is to be used for asynchronous reading.) and SequentialScan (The file is to be accessed sequentially from beginning to end.) </param>
/// <returns>A string containing all lines of the file.</returns>