// Copyright (c) Arlo Godfrey. All Rights Reserved. // Licensed under the GNU Lesser General Public License, Version 3.0 with additional terms. // See the LICENSE, LICENSE.LESSER and LICENSE.ADDITIONAL files in the project root for more information. using System.IO; namespace StrixMusic.Sdk.FileMetadata.Scanners { /// internal sealed class FileAbstraction : TagLib.File.IFileAbstraction { /// /// Initializes a new instance of the class. /// public FileAbstraction(string fileName, Stream file) { Name = fileName; Stream = file; } /// /// The name of the file. /// public string Name { get; } /// /// The stream used to construct this . /// public Stream Stream { get; } /// /// A stream that can read the file. /// public Stream ReadStream => Stream; /// /// A stream that can write to the file. /// public Stream WriteStream => Stream; /// /// Closes the stream. /// public void CloseStream(Stream stream) { stream.Close(); } } }