Interface IContentFileHandle
Interface describing a logical file that is part of a content item.
Inherited Members
Namespace: Tableau.Migration.Content.Files
Assembly: Tableau.Migration.dll
Syntax
public interface IContentFileHandle : IAsyncDisposable
Properties
OriginalFileName
Gets the original filename of the file, used for the upload filename when publishing the content item.
Declaration
string OriginalFileName { get; }
Property Value
Type | Description |
---|---|
string |
Path
Gets the path to the file.
Declaration
string Path { get; }
Property Value
Type | Description |
---|---|
string |
Store
Gets the file store the handle is for.
Declaration
IContentFileStore Store { get; }
Property Value
Type | Description |
---|---|
IContentFileStore |
Methods
GetXmlStreamAsync(CancellationToken)
Gets the current read/write stream to the XML content of the Tableau file, opening a new stream if necessary. Changes to the stream will be automatically saved before publishing.
Declaration
Task<ITableauFileXmlStream> GetXmlStreamAsync(CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancel |
Returns
Type | Description |
---|---|
Task<ITableauFileXmlStream> | The XML stream to edit. |
OpenReadAsync(CancellationToken)
Opens a stream to read from a file.
Declaration
Task<IContentFileStream> OpenReadAsync(CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IContentFileStream> | The stream to read from. |
OpenWriteAsync(CancellationToken)
Opens a stream to write to a file.
Declaration
Task<IContentFileStream> OpenWriteAsync(CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IContentFileStream> | The stream to write to. |