DirectoryItem
Represents a directory item in the FileBrowser control.
Definition
Namespace:Telerik.Web.UI.Widgets
Assembly:Telerik.Web.UI.dll
Syntax:
public class DirectoryItem : FileBrowserItem
Inheritance: objectFileBrowserItemDirectoryItem
Derived Classes:
Inherited Members
Constructors
Creates an instance of the DirectoryItem class.
public DirectoryItem()
Creates an instance of the DirectoryItem class.
[SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public DirectoryItem(string name, string location, string fullPath, string tag, PathPermissions permissions, FileItem[] files, DirectoryItem[] directories)
The name of the directory item.
locationstringThe location of the directory item. To let the FileBrowser control automatically build its path you should set this parameter to string.Empty. If the DirectoryItem is a root item, this parameter must contain the virtual location of the item.
fullPathstringThe full virtual path of the directory item. Used by the ContentProvider for populating the Directories and Files properties.
tagstringThe tag of the directory item. Used when the virtual path must be different than the url of the item. When the value of this property is set, the FileBrowser control uses it instead of the combined virtual path.
permissionsPathPermissionsThe permissions for this directory item.
filesFileItem[]A FileItem array containing all child file items.
directoriesDirectoryItem[]A DirectoryItem array containing all child directory items.
Properties
Gets a DirectoryItem array containing all child directory items.
public DirectoryItem[] Directories { get; set; }
Gets a FileItem array containing all child file items.
public FileItem[] Files { get; set; }
Gets the full virtual path to the directory item.
public string FullPath { get; set; }
Gets the virtual location of the directory item. When the item is not root, the value of this property should be string.Empty. The FileBrowser control recursively combines the names of all parent directory items in order to get the full virtual path of the item.
public string Location { get; set; }
Methods
Clears the Directories array. Can be used when building the directory list in List mode.
public void ClearDirectories()
Serializes the directory item into a javascript array. This method should be overridden only when developing a custom FileBrowser control.
public override void Serialize(StringWriter writer)
a StringWriter used as a target for the serialization.
Overrides:
Serializes the children of the directory item as a javascript array. Recursively calls the Serialize methods of all child objects.
public void SerializeContent(StringWriter writer)
a StringWriter used as a target for the serialization.