Understanding the VirtualPathProvider Class

The VirtualPathProvider class is a MustInherit (abstract) class. It contains the following methods, which you can override:

CombineVirtualPaths ()Returns a combined path from two paths.

DirectoryExists() Returns true when a directory exists.

FileExists() Returns true when a file exists.

GetCacheDependency() Returns a cache dependency object that indicates when a file has been changed.

GetCacheKey() Returns the key used by the cache dependency.

GetDirectory() Returns a VirtualDirectory.

GetFile() Returns a VirtualFile.

GetFileHash() Returns a hash of the files used by the cache dependency.

OpenFile() Returns the contents of a file.

Typically, you override the FileExists()

Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.