Class FileTransferObject
The file transfer object is used to store files included in the transfer process.
Inheritance
Implements
Namespace: EPiServer.Core.Transfer.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public class FileTransferObject : Object, IFileTransferObject
Constructors
FileTransferObject()
Initializes a new instance of the FileTransferObject class.
Declaration
public FileTransferObject()
FileTransferObject(String)
Initializes a new instance of the FileTransferObject class.
Declaration
protected FileTransferObject(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url |
FileTransferObject(String, IContentRepository, IPermanentLinkMapper, ContentAssetHelper, IBlobFactory, IContentSecurityRepository, ContentMediaResolver)
Initializes a new instance of the FileTransferObject class.
Declaration
public FileTransferObject(string url, IContentRepository contentRepository, IPermanentLinkMapper permanentLinkMapper, ContentAssetHelper contentAssetHelper, IBlobFactory blobFactory, IContentSecurityRepository contentSecurityRepository, ContentMediaResolver mediaResolver)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | |
IContentRepository | contentRepository | |
IPermanentLinkMapper | permanentLinkMapper | |
ContentAssetHelper | contentAssetHelper | |
IBlobFactory | blobFactory | |
IContentSecurityRepository | contentSecurityRepository | |
ContentMediaResolver | mediaResolver |
Properties
Changed
Gets or sets the changed time for the file.
Declaration
public DateTime Changed { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | The date when the file was last updated. |
ForceNewFileObject
Gets or sets a value indicating whether the file should be created with a new identity.
Declaration
public bool ForceNewFileObject { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
PageGuid
Gets or sets the page identity if the file is a page folder file.
Declaration
public Guid PageGuid { get; set; }
Property Value
Type | Description |
---|---|
System.Guid | The page identity of the page that this file contains. |
PermanentLinkVirtualPath
Gets the virtual path in the permanent link format for the file.
Declaration
public string PermanentLinkVirtualPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The permanent link virtual path |
ProviderName
Gets or sets the name of the provider for the transfered file.
Declaration
public string ProviderName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the provider. |
ProviderRelativePath
Gets or sets the provider relative path for the transfered file.
Declaration
public string ProviderRelativePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The provider relative path. |
ProviderRelativeUnifiedPath
Gets or sets the UnifiedPath (relative the specified provider) that ACL is specified on
Declaration
public string ProviderRelativeUnifiedPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The unified path. |
RawACL
Gets or sets the ACL for the file.
Declaration
public RawACE[] RawACL { get; set; }
Property Value
Type | Description |
---|---|
RawACE[] |
SummaryKeys
Gets or sets the summary keys for file metadata.
Declaration
public string[] SummaryKeys { get; set; }
Property Value
Type | Description |
---|---|
System.String[] | The summary keys. |
SummaryValues
Gets or sets the summary values for file metadata.
Declaration
public string[] SummaryValues { get; set; }
Property Value
Type | Description |
---|---|
System.String[] | The summary values. |
Url
Gets or sets the URL for the file.
Declaration
public string Url { get; set; }
Property Value
Type | Description |
---|---|
System.String | The URL. |
Remarks
This property should not be used, instead should ProviderRelativePath be used.
Exceptions
Type | Condition |
---|---|
EPiServerException | Is thrown from both getter and setter. |
Methods
CheckIn(String)
Declaration
public void CheckIn(string commment)
Parameters
Type | Name | Description |
---|---|---|
System.String | commment |
CheckinIfVersionedFile()
Checks if transferred file is versioned, if so and if the file is checked out the file is checked in.
Declaration
public void CheckinIfVersionedFile()
FillSummary(IContentMedia, IContentTransferContext)
Fills the summary with information from this instance.
Declaration
public void FillSummary(IContentMedia media, IContentTransferContext context)
Parameters
Type | Name | Description |
---|---|---|
IContentMedia | media | The summary object to fill with data. |
IContentTransferContext | context | The context. |
IsPageFolderForPage(PageData)
Determines whether the file belong to page folder.
Declaration
public bool IsPageFolderForPage(PageData page)
Parameters
Type | Name | Description |
---|---|---|
PageData | page | The page. |
Returns
Type | Description |
---|---|
System.Boolean |
|
OpenRead()
Opens a stream for reading this file.
Declaration
public Stream OpenRead()
Returns
Type | Description |
---|---|
System.IO.Stream | A read stream. |
OpenWrite(IContentTransferContext)
Opens a stream for writing to this file.
Declaration
public Stream OpenWrite(IContentTransferContext context)
Parameters
Type | Name | Description |
---|---|---|
IContentTransferContext | context | The transfer context. |
Returns
Type | Description |
---|---|
System.IO.Stream | A write stream. |