using System.IO;
using MediaBrowser.Model.IO;
namespace MediaBrowser.MediaEncoding.BdInfo;
/// 
/// Class BdInfoFileInfo.
/// 
public class BdInfoFileInfo : BDInfo.IO.IFileInfo
{
    private readonly FileSystemMetadata _impl;
    /// 
    /// Initializes a new instance of the  class.
    /// 
    /// The .
    public BdInfoFileInfo(FileSystemMetadata impl)
    {
        _impl = impl;
    }
    /// 
    /// Gets the name.
    /// 
    public string Name => _impl.Name;
    /// 
    /// Gets the full name.
    /// 
    public string FullName => _impl.FullName;
    /// 
    /// Gets the extension.
    /// 
    public string Extension => _impl.Extension;
    /// 
    /// Gets the length.
    /// 
    public long Length => _impl.Length;
    /// 
    /// Gets a value indicating whether this is a directory.
    /// 
    public bool IsDir => _impl.IsDirectory;
    /// 
    /// Gets a file as file stream.
    /// 
    /// A  for the file.
    public Stream OpenRead()
    {
        return new FileStream(
            FullName,
            FileMode.Open,
            FileAccess.Read,
            FileShare.Read);
    }
    /// 
    /// Gets a files's content with a stream reader.
    /// 
    /// A  for the file's content.
    public StreamReader OpenText()
    {
        return new StreamReader(OpenRead());
    }
}