Class ZipArchiveFileProvider
A Microsoft.
Inheritance
Implements
Namespace: EPiServer.Web.Hosting
Assembly: EPiServer.Framework.AspNetCore.dll
Version: 12.0.3Syntax
public class ZipArchiveFileProvider : Object, IBasePathFileProvider, IFileProvider, IDisposable
Constructors
ZipArchiveFileProvider(String, String)
Initializes a new instance of the Zip
Declaration
public ZipArchiveFileProvider(string virtualPath, string archivePath)
Parameters
Type | Name | Description |
---|---|---|
System. |
virtualPath | The virtual path that should be mapped by the provider |
System. |
archivePath | Relative or absolute path to the zip archive file |
ZipArchiveFileProvider(String, String, String)
Initializes a new instance of the Zip
Declaration
public ZipArchiveFileProvider(string virtualPath, string archivePath, string archiveBasePath)
Parameters
Type | Name | Description |
---|---|---|
System. |
virtualPath | The virtual path that should be mapped by the provider |
System. |
archivePath | Relative or absolute path to the zip archive file |
System. |
archiveBasePath | The base path inside the zip archive that should be use. e.g. if you want to make any subfolder as the base path |
Properties
BasePath
Base path for file provider
Declaration
public string BasePath { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
ClearResources()
Empties the in-memory data and loaded archive
Declaration
public void ClearResources()
Dispose()
Cleanup for ZipArchiveFileProvider
Declaration
public void Dispose()
Dispose(Boolean)
Cleanup for ZipArchiveFileProvider
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System. |
disposing |
Finalize()
Distructor for ZipArchiveFileProvider
Declaration
protected override void Finalize()
GetDirectory(String)
Returns the virtual folder by given virtual directory path
Declaration
public IFileInfo GetDirectory(string virtualDir)
Parameters
Type | Name | Description |
---|---|---|
System. |
virtualDir | The virtual path to the directory |
Returns
Type | Description |
---|---|
Microsoft. |
GetDirectoryContents(String)
Returns content of a directory
Declaration
public IDirectoryContents GetDirectoryContents(string subpath)
Parameters
Type | Name | Description |
---|---|---|
System. |
subpath | The directory to return content of |
Returns
Type | Description |
---|---|
Microsoft. |
The directorys content |
GetFile(String)
Returns the mapped file if there is one; otherwise fall back to the base implementation
Declaration
public IFileInfo GetFile(string virtualPath)
Parameters
Type | Name | Description |
---|---|---|
System. |
virtualPath | Path to the file |
Returns
Type | Description |
---|---|
Microsoft. |
A virtual file if one exists; otherwise null |
GetFileInfo(String)
Get info of a file
Declaration
public IFileInfo GetFileInfo(string subpath)
Parameters
Type | Name | Description |
---|---|---|
System. |
subpath | Path to the file |
Returns
Type | Description |
---|---|
Microsoft. |
A FileInfo |
Watch(String)
Watches files for changes
Declaration
public IChangeToken Watch(string filter)
Parameters
Type | Name | Description |
---|---|---|
System. |
filter | Filter file names |
Returns
Type | Description |
---|---|
Microsoft. |