2020-01-08 16:52:50 +00:00
|
|
|
using System.IO;
|
2019-10-13 09:21:20 +00:00
|
|
|
using MediaBrowser.Model.IO;
|
|
|
|
|
|
|
|
namespace MediaBrowser.MediaEncoding.BdInfo
|
|
|
|
{
|
|
|
|
class BdInfoFileInfo : BDInfo.IO.IFileInfo
|
|
|
|
{
|
|
|
|
FileSystemMetadata _impl = null;
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2020-01-08 16:52:50 +00:00
|
|
|
public BdInfoFileInfo(FileSystemMetadata impl)
|
2019-10-13 09:21:20 +00:00
|
|
|
{
|
|
|
|
_impl = impl;
|
|
|
|
}
|
|
|
|
|
|
|
|
public System.IO.Stream OpenRead()
|
|
|
|
{
|
2020-01-08 16:52:50 +00:00
|
|
|
return new FileStream(FullName,
|
|
|
|
FileMode.Open,
|
|
|
|
FileAccess.Read,
|
|
|
|
FileShare.Read);
|
2019-10-13 09:21:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public System.IO.StreamReader OpenText()
|
|
|
|
{
|
|
|
|
return new System.IO.StreamReader(OpenRead());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|