diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2023-02-03 18:49:23 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2023-02-04 18:36:47 +0100 |
| commit | 519709bf10e30a3666af100df4fcca206dcef498 (patch) | |
| tree | 82eed199d4ca20cedeb7c9fa3db0977bb6dabd1b /MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs | |
| parent | 6bf34f8e22c6f72bde15cbb4b500fc6c4f3273b3 (diff) | |
Revert "Remove DvdLib (#9068)"
This reverts commit db1913b08fac0749133634efebd1ee7a7876147a.
Diffstat (limited to 'MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs')
| -rw-r--r-- | MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs b/MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs new file mode 100644 index 0000000000..d55688e3df --- /dev/null +++ b/MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs @@ -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()); + } + } +} |
