Class VersioningFileHandler
The internal EPiServer implementation of a versioned file share.
Inheritance
Inherited Members
Namespace: EPiServer.Web.Hosting.Versioning
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class VersioningFileHandler : IFileHandler, IVersionedFile, IFastFileDownload
Properties
Changed
Gets the changed date/time
Declaration
public DateTime Changed { get; }
Property Value
Type | Description |
---|---|
System.DateTime | The changed. |
ChangedBy
Username of the user that changed the file.
Declaration
public string ChangedBy { get; }
Property Value
Type | Description |
---|---|
System.String |
CheckedOut
If checked out; the date when the file was checked out.
Declaration
public DateTime CheckedOut { get; }
Property Value
Type | Description |
---|---|
System.DateTime |
CheckedOutBy
If checked out; the username of the user who has this file checked out.
Declaration
public string CheckedOutBy { get; }
Property Value
Type | Description |
---|---|
System.String |
Created
Gets the created date/time
Declaration
public DateTime Created { get; }
Property Value
Type | Description |
---|---|
System.DateTime | The created. |
CreatedBy
The username of the user that created this file.
Declaration
public string CreatedBy { get; }
Property Value
Type | Description |
---|---|
System.String |
InternalItem
Gets the internal file item.
Declaration
public FileItem InternalItem { get; }
Property Value
Type | Description |
---|---|
FileItem | The internal item. |
IsCheckedOut
Check whether the file is checked out.
Declaration
public bool IsCheckedOut { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Length
Returns the length of the file
Declaration
public long Length { get; }
Property Value
Type | Description |
---|---|
System.Int64 | The length. |
Name
Returns the name of the file
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
CheckIn(String)
Check in file, requires the file to be checked out first.
Declaration
public void CheckIn(string comments)
Parameters
Type | Name | Description |
---|---|---|
System.String | comments | Comments entered by the user. |
CheckOut()
Called to check out a file.
Declaration
public void CheckOut()
Delete()
Deletes the file instance.
Declaration
public void Delete()
GetCheckedOutVersion()
Called when the checked out version needs to be retrieved for a user.
Declaration
public IFileVersion GetCheckedOutVersion()
Returns
Type | Description |
---|---|
IFileVersion |
GetFullPath()
Should return the full path to the file of the current unified file.
Declaration
public string GetFullPath()
Returns
Type | Description |
---|---|
System.String |
GetVersions()
Gets a list of all versions.
Declaration
public IFileVersion[] GetVersions()
Returns
Type | Description |
---|---|
IFileVersion[] |
MoveTo(IDirectoryHandler)
Moves the file instance to a another directory
Declaration
public void MoveTo(IDirectoryHandler dir)
Parameters
Type | Name | Description |
---|---|---|
IDirectoryHandler | dir | The dir. |
Open(FileMode, FileAccess, FileShare)
Opens the file in the specified mode.
Declaration
public Stream Open(FileMode mode, FileAccess access, FileShare share)
Parameters
Type | Name | Description |
---|---|---|
System.IO.FileMode | mode | The mode. |
System.IO.FileAccess | access | The access. |
System.IO.FileShare | share | The share. |
Returns
Type | Description |
---|---|
System.IO.Stream |
OpenRead()
Opens a read stream to the file.
Declaration
public Stream OpenRead()
Returns
Type | Description |
---|---|
System.IO.Stream | a readable stream |
OpenWrite()
Opens a write stream to the file.
Declaration
public Stream OpenWrite()
Returns
Type | Description |
---|---|
System.IO.Stream | a writable stream |
Rename(String)
Renames the file instance
Declaration
public void Rename(string newName)
Parameters
Type | Name | Description |
---|---|---|
System.String | newName | The new name. |
UndoCheckOut()
Called when a user wants to undo a checked out file.
Declaration
public void UndoCheckOut()