Class FileDownloadItem
IDownloadItem implementation for downloading to a file specified by path.
Implements
Inherited Members
Namespace: UnityEditor.Build.CacheServer
Assembly: UnityEditor.CacheServer.dll
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 |
Type
The type of the FileDownloadItems desired item.
Declaration
public FileType Type { get; }
Property Value
| Type | Description |
|---|---|
| FileType |
Methods
Finish()
Dispose the FileDownloadItems write stream and move the data from the temporary path to its final destination.
Declaration
public void Finish()
GetWriteStream(long)
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 |
|---|---|---|
| long | size |
Returns
| Type | Description |
|---|---|
| Stream |