Firstborn/Library/PackageCache/com.unity.scriptablebuildpi.../Editor/CacheServer/IDownloadItem.cs
Schaken-Mods 7502018d20 Adding Mod Support
There is an asset in the store I grabbed. the coding is WAY above my head, I got about half of it and integrated and adapted what I can to it. im going as far as I can with it and ill come back in a few month when I understand t better.
2023-05-13 22:01:48 -05:00

34 lines
992 B
C#

using System.IO;
namespace UnityEditor.Build.CacheServer
{
/// <summary>
/// Represents a single file download request from a Cache Server.
/// </summary>
public interface IDownloadItem
{
/// <summary>
/// the FileId (guid/hash pair) of the file to download
/// </summary>
FileId Id { get; }
/// <summary>
/// the FileType for the given FileId to download
/// </summary>
FileType Type { get; }
/// <summary>
/// Provides a writable stream for saving downloaded file bytes
/// </summary>
/// <param name="size">Size of file to download</param>
/// <returns>A writable stream</returns>
Stream GetWriteStream(long size);
/// <summary>
/// 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.
/// </summary>
void Finish();
}
}