docs.unity3d.com
    Show / Hide Table of Contents

    Class FileDownloadItem

    IDownloadItem implementation for downloading to a file specified by path.

    Inheritance
    Object
    FileDownloadItem
    Namespace: UnityEditor.Build.CacheServer
    Syntax
    public class FileDownloadItem : IDownloadItem

    Constructors

    FileDownloadItem(FileId, FileType, String)

    Create a new FileDownloadItem

    Declaration
    public FileDownloadItem(FileId fileId, FileType fileType, string path)
    Parameters
    Type Name Description
    FileId fileId

    The FileId of the desired item.

    FileType fileType

    The FileType of the desired item.

    String path

    The path of the desired item.

    Properties

    FilePath

    File path where downloaded file data is saved. Data is first written to a temporary file location, and moved into place when the Finish() method is called by the Cache Server Client.

    Declaration
    public string FilePath { get; }
    Property Value
    Type Description
    String

    Id

    The FileId for the FileDownloadItem. FileId consists of an assets guid and hash code.

    Declaration
    public FileId Id { get; }
    Property Value
    Type Description
    FileId
    Implements
    IDownloadItem.Id

    Type

    The type of the FileDownloadItems desired item.

    Declaration
    public FileType Type { get; }
    Property Value
    Type Description
    FileType
    Implements
    IDownloadItem.Type

    Methods

    Finish()

    Dispose the FileDownloadItems write stream and move the data from the temporary path to its final destination.

    Declaration
    public void Finish()
    Implements
    IDownloadItem.Finish()

    GetWriteStream(Int64)

    Gets the write stream for a given FileDownloadItem. If one does not exist, it will be created.

    Declaration
    public Stream GetWriteStream(long size)
    Parameters
    Type Name Description
    Int64 size
    Returns
    Type Description
    Stream
    Implements
    IDownloadItem.GetWriteStream(Int64)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023