using System;
using System.IO;
using Volpe.Cafe.IO.DSV;

namespace Volpe.Cafe.IO.TSV
{
    /// <summary>
    /// Represents a reader that can read data from a tab-separated values (TSV) file.
    /// </summary>
    /// <inheritdoc cref="TsvFile" path="/remarks"/>
    [Serializable]
    public class TsvReader : DsvReader
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TsvReader"/> class for the specified file.
        /// </summary>
        /// <param name="path">The complete file path to read.</param>
        /// <inheritdoc cref="StreamReader(string)" path="/exception"/>
        public TsvReader(string path) : base(path, TsvFile.Delimiter) { }

        /// <summary>
        /// Initializes a new instance of the <see cref="TsvReader"/> class for the specified file.
        /// </summary>
        /// <param name="path">The complete file path to read.</param>
        /// <param name="escapeChar">
        ///     An escape character used for enclosing fields that include special characters.
        /// </param>
        /// <inheritdoc cref="StreamReader(string)" path="/exception"/>
        protected TsvReader(string path, char escapeChar) : base(path, TsvFile.Delimiter, escapeChar) { }

    }
}
