mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 12:44:19 +01:00
41
MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs
Normal file
41
MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
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 Stream OpenRead()
|
||||
{
|
||||
return new FileStream(
|
||||
FullName,
|
||||
FileMode.Open,
|
||||
FileAccess.Read,
|
||||
FileShare.Read);
|
||||
}
|
||||
|
||||
public StreamReader OpenText()
|
||||
{
|
||||
return new StreamReader(OpenRead());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user