Interface IFileType
Represents a deployable file type.
Namespace: Umbraco.Cms.Core.Deploy
Assembly: Umbraco.Core.dll
Syntax
public interface IFileType
Properties
View SourceCanSetPhysical
Gets a value indicating whether the file can be set using a physical path.
Declaration
bool CanSetPhysical { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
View SourceGetChecksumStream(StringUdi)
Gets the checksum stream.
Declaration
Stream GetChecksumStream(StringUdi udi)
Parameters
Type | Name | Description |
---|---|---|
StringUdi | udi | The UDI. |
Returns
Type | Description |
---|---|
Stream | The checksum stream. |
GetLength(StringUdi)
Gets the file length in bytes or -1
if not found.
Declaration
long GetLength(StringUdi udi)
Parameters
Type | Name | Description |
---|---|---|
StringUdi | udi | The UDI. |
Returns
Type | Description |
---|---|
System.Int64 | The file length in bytes or |
GetPhysicalPath(StringUdi)
Gets the physical path or System.String.Empty if not found.
Declaration
string GetPhysicalPath(StringUdi udi)
Parameters
Type | Name | Description |
---|---|---|
StringUdi | udi | The UDI. |
Returns
Type | Description |
---|---|
System.String | The physical path or System.String.Empty if not found. |
Remarks
This is not pretty as everywhere in Deploy we take care of ignoring the physical path and always rely on the virtual IFileSystem, but Cloud wants to add some of these files to Git and needs the path...
GetStream(StringUdi)
Gets the stream.
Declaration
Stream GetStream(StringUdi udi)
Parameters
Type | Name | Description |
---|---|---|
StringUdi | udi | The UDI. |
Returns
Type | Description |
---|---|
Stream | The stream. |
GetStreamAsync(StringUdi, CancellationToken)
Gets the stream as an asynchronous operation.
Declaration
Task<Stream> GetStreamAsync(StringUdi udi, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
StringUdi | udi | The UDI. |
CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
Task<Stream> | The task object representing the asynchronous operation. |
GetVirtualPath(StringUdi)
Gets the virtual path or System.String.Empty if not found.
Declaration
string GetVirtualPath(StringUdi udi)
Parameters
Type | Name | Description |
---|---|---|
StringUdi | udi | The UDI. |
Returns
Type | Description |
---|---|
System.String | The virtual path or System.String.Empty if not found. |
Set(StringUdi, String, Boolean)
Sets the physical path of the file.
Declaration
void Set(StringUdi udi, string physicalPath, bool copy = false)
Parameters
Type | Name | Description |
---|---|---|
StringUdi | udi | The UDI. |
System.String | physicalPath | The physical path. |
System.Boolean | copy | If set to |
SetStream(StringUdi, Stream)
Sets the stream.
Declaration
void SetStream(StringUdi udi, Stream stream)
Parameters
Type | Name | Description |
---|---|---|
StringUdi | udi | The UDI. |
Stream | stream | The stream. |
SetStreamAsync(StringUdi, Stream, CancellationToken)
Sets the stream as an asynchronous operation.
Declaration
Task SetStreamAsync(StringUdi udi, Stream stream, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
StringUdi | udi | The UDI. |
Stream | stream | The stream. |
CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
Task | The task object representing the asynchronous operation. |