You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
981 B
41 lines
981 B
5 years ago
|
using MediaBrowser.Model.IO;
|
||
|
|
||
|
namespace MediaBrowser.MediaEncoding.BdInfo
|
||
|
{
|
||
|
class BdInfoFileInfo : BDInfo.IO.IFileInfo
|
||
|
{
|
||
|
IFileSystem _fileSystem = null;
|
||
|
|
||
|
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;
|
||
|
|
||
|
public BdInfoFileInfo(IFileSystem fileSystem, FileSystemMetadata impl)
|
||
|
{
|
||
|
_fileSystem = fileSystem;
|
||
|
_impl = impl;
|
||
|
}
|
||
|
|
||
|
public System.IO.Stream OpenRead()
|
||
|
{
|
||
|
return _fileSystem.GetFileStream(FullName,
|
||
|
FileOpenMode.Open,
|
||
|
FileAccessMode.Read,
|
||
|
FileShareMode.Read);
|
||
|
}
|
||
|
|
||
|
public System.IO.StreamReader OpenText()
|
||
|
{
|
||
|
return new System.IO.StreamReader(OpenRead());
|
||
|
}
|
||
|
}
|
||
|
}
|