System.Web.Hosting.VirtualPathProvider.GetDirectory Method

Gets a virtual directory from the virtual file system.

Syntax

public virtual VirtualDirectory GetDirectory (string virtualDir)

Parameters

virtualDir
The path to the virtual directory.

Returns

A descendent of the System.Web.Hosting.VirtualDirectory class that represents a directory in the virtual file system.

Remarks

The VirtualPathProvider.GetDirectory(string) method returns a descendent of the System.Web.Hosting.VirtualDirectory class that contains the file and directories contained in the directory specified in the virtualDir parameter.

If your custom System.Web.Hosting.VirtualPathProvider class does not support directories, the VirtualPathProvider.GetDirectory(string) method should return null.

Note:

If your virtual file system will contain themes for the Web site (by creating a virtual App_Themes directory), your custom System.Web.Hosting.VirtualPathProvider class must support directories.

Requirements

Namespace: System.Web.Hosting
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0