Provides a file system-based implementation of the FileBrowserContentProvider for managing files and directories.
Definition
Namespace:Telerik.Web.UI.Widgets
Assembly:Telerik.Web.UI.dll
Syntax:
public class FileSystemContentProvider : FileBrowserContentProvider
Inheritance: objectFileBrowserContentProviderFileSystemContentProvider
Inherited Members
Constructors
Initializes a new instance of the FileSystemContentProvider class for managing files and directories in the file system.
[SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public FileSystemContentProvider(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl, string selectedItemTag)
The current HTTP context.
searchPatternsstring[]Search patterns for files (supports wildcards).
viewPathsstring[]Paths to be displayed in the file browser.
uploadPathsstring[]Paths that allow uploading files.
deletePathsstring[]Paths that allow deleting files or directories.
selectedUrlstringThe selected URL in the file browser.
selectedItemTagstringThe selected tag in the file browser.
Properties
Gets a value indicating whether the content provider can create directories.
public override bool CanCreateDirectory { get; }
Overrides:
Methods
Copies a directory from one virtual path to another.
Copies a file from one virtual path to another.
Creates a new directory at the specified path with the given name.
Gets the permissions for the specified path based on upload and delete paths.
protected PathPermissions GetPermissions(string path)
The path to check permissions for.
Returns:The permissions for the path.
Determines whether the specified virtual parent path is a parent of the virtual child path.
Determines whether the specified directory is valid for inclusion in the file browser.
protected virtual bool IsValid(DirectoryInfo directory)
The directory to validate.
Returns:True if the directory is valid; otherwise, false.
Moves a directory from one virtual path to another.
Moves a file from one virtual path to another.
Processes the specified array of paths, converting each to its absolute path.
Resolves the specified directory and returns its contents.
public override DirectoryItem ResolveDirectory(string path)
The virtual path of the directory.
Returns:A DirectoryItem containing the files in the directory.
Overrides:
Resolves the root directory as a tree structure for the specified virtual path.
public override DirectoryItem ResolveRootDirectoryAsTree(string path)
The virtual path of the root directory.
Returns:A DirectoryItem representing the root directory and its subdirectories.
Overrides:
Stores a bitmap image at the specified URL using the given image format.
public override string StoreBitmap(Bitmap bitmap, string url, ImageFormat format)
The Bitmap to store.
urlstringThe URL where the bitmap will be stored.
formatImageFormatThe image format to use.
Returns:The URL where the bitmap was stored.
Overrides:
Stores a file from an HttpPostedFile at the specified path and name.
[Obsolete("Please use the other overload of StoreFile()")]
public override string StoreFile(HttpPostedFile file, string path, string name, params string[] arguments)
The HttpPostedFile to store.
pathstringThe virtual path where the file will be stored.
namestringThe name of the file.
argumentsstring[]Additional arguments for storing the file.
Returns:The virtual path of the stored file.
Overrides:
Stores an uploaded file at the specified path and name.
public override string StoreFile(UploadedFile file, string path, string name, params string[] arguments)
The UploadedFile to store.
pathstringThe virtual path where the file will be stored.
namestringThe name of the file.
argumentsstring[]Additional arguments for storing the file.
Returns:The virtual path of the stored file.
Overrides: