jellyfin/MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs

42 lines
929 B
C#
Raw Normal View History

#pragma warning disable CS1591
2020-01-08 16:52:50 +00:00
using System.IO;
using MediaBrowser.Model.IO;
namespace MediaBrowser.MediaEncoding.BdInfo
{
public class BdInfoFileInfo : BDInfo.IO.IFileInfo
{
private FileSystemMetadata _impl;
public BdInfoFileInfo(FileSystemMetadata impl)
{
_impl = impl;
}
public string Name => _impl.Name;
public string FullName => _impl.FullName;
public string Extension => _impl.Extension;
public long Length => _impl.Length;
public bool IsDir => _impl.IsDirectory;
public System.IO.Stream OpenRead()
{
return new FileStream(
FullName,
2020-01-08 16:52:50 +00:00
FileMode.Open,
FileAccess.Read,
FileShare.Read);
}
public System.IO.StreamReader OpenText()
{
return new System.IO.StreamReader(OpenRead());
}
}
}