using System.IO;
namespace UnityEditor.Build.CacheServer
{
///
/// Represents a single file download request from a Cache Server.
///
public interface IDownloadItem
{
///
/// the FileId (guid/hash pair) of the file to download
///
FileId Id { get; }
///
/// the FileType for the given FileId to download
///
FileType Type { get; }
///
/// Provides a writable stream for saving downloaded file bytes
///
/// Size of file to download
/// A writable stream
Stream GetWriteStream(long size);
///
/// Method called when a download is finished. Used to finalize and cleanup a single file download. e.g. to move
/// a temporary file into place.
///
void Finish();
}
}