Class ReadOnlyDirectory
A Directory that is readonly meaning it cannot contain files or sub directories
Inherited Members
Namespace: EPiServer.Web.Hosting
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class ReadOnlyDirectory : UnifiedDirectory
Constructors
ReadOnlyDirectory(Exception, VirtualPathUnifiedProvider, String)
Initializes a new instance of the ReadOnlyDirectory class.
Declaration
public ReadOnlyDirectory(Exception exception, VirtualPathUnifiedProvider provider, string virtualPath)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | exception | The exception that will be thrown when a none supported action is perfomred, e.g. CreateFile |
VirtualPathUnifiedProvider | provider | The provider. |
System.String | virtualPath | The virtual path. |
Properties
ACL
Declaration
public override AccessControlList ACL { get; }
Property Value
Type | Description |
---|---|
AccessControlList |
Overrides
BypassAccessCheck
Gets or set a value indicating whether to bypass access check for directory.
Declaration
public override bool BypassAccessCheck { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Overrides
Remarks
It is not possible to bypass access check for readonly directory
Children
Returns empty list
Declaration
public override IEnumerable Children { get; }
Property Value
Type | Description |
---|---|
System.Collections.IEnumerable |
Overrides
Directories
Returns empty list
Declaration
public override IEnumerable Directories { get; }
Property Value
Type | Description |
---|---|
System.Collections.IEnumerable |
Overrides
Files
Returns empty list
Declaration
public override IEnumerable Files { get; }
Property Value
Type | Description |
---|---|
System.Collections.IEnumerable |
Overrides
Parent
Always returns the root folder for the provider.
Declaration
public override UnifiedDirectory Parent { get; }
Property Value
Type | Description |
---|---|
UnifiedDirectory | The parent. |
Overrides
Methods
CopyTo(String)
Not allowed for ReadOnlyDirectory. Exception given in constructor will be thrown.
Declaration
public override void CopyTo(string newVirtualPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | newVirtualPath | The new virtual path. |
Overrides
CreateFile(String)
Not allowed for ReadOnlyDirectory. Exception given in constructor will be thrown.
Declaration
public override UnifiedFile CreateFile(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
Returns
Type | Description |
---|---|
UnifiedFile |
Overrides
CreateFile(String, Guid)
Not allowed for ReadOnlyDirectory. Exception given in constructor will be thrown.
Declaration
public override UnifiedFile CreateFile(string name, Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.Guid | id | The id. |
Returns
Type | Description |
---|---|
UnifiedFile |
Overrides
CreateSubdirectory(String)
Not allowed for ReadOnlyDirectory. Exception given in constructor will be thrown.
Declaration
public override UnifiedDirectory CreateSubdirectory(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path. |
Returns
Type | Description |
---|---|
UnifiedDirectory |
Overrides
Delete()
Not allowed for ReadOnlyDirectory. Exception given in constructor will be thrown.
Declaration
public override void Delete()
Overrides
GetDirectories()
Returns empty list
Declaration
public override UnifiedDirectory[] GetDirectories()
Returns
Type | Description |
---|---|
UnifiedDirectory[] |
Overrides
GetFiles()
Returns empty list
Declaration
public override UnifiedFile[] GetFiles()
Returns
Type | Description |
---|---|
UnifiedFile[] |
Overrides
MoveTo(String)
Not allowed for ReadOnlyDirectory. Exception given in constructor will be thrown.
Declaration
public override void MoveTo(string newVirtualPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | newVirtualPath | The new virtual path. |
Overrides
QueryAccess()
Always returns EPiServer.Security.AccessLevel.Read for ReadOnlyDirectory
Declaration
public override AccessLevel QueryAccess()
Returns
Type | Description |
---|---|
AccessLevel | The access level. |
Overrides
QueryDistinctAccess(AccessLevel)
Returns true if access is EPiServer.Security.AccessLevel.Read otherwise false
Declaration
public override bool QueryDistinctAccess(AccessLevel access)
Parameters
Type | Name | Description |
---|---|---|
AccessLevel | access | The required access level. |
Returns
Type | Description |
---|---|
System.Boolean |