New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Represents a directory item in the FileBrowser control.

Definition

Constructors

Creates an instance of the DirectoryItem class.

C#
public DirectoryItem()

Creates an instance of the DirectoryItem class.

C#
[SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public DirectoryItem(string name, string location, string fullPath, string tag, PathPermissions permissions, FileItem[] files, DirectoryItem[] directories)
Parameters:namestring

The name of the directory item.

locationstring

The 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.

fullPathstring

The full virtual path of the directory item. Used by the ContentProvider for populating the Directories and Files properties.

tagstring

The 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.

permissionsPathPermissions

The 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.

C#
public DirectoryItem[] Directories { get; set; }

Gets a FileItem array containing all child file items.

C#
public FileItem[] Files { get; set; }

Gets the full virtual path to the directory item.

C#
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.

C#
public string Location { get; set; }

Gets the full virtual path to the directory item.

C#
public override string Path { get; }

Overrides: FileBrowserItem.Path

Methods

Clears the Directories array. Can be used when building the directory list in List mode.

C#
public void ClearDirectories()
C#
public string GetSerializedContent()
Returns:

string

Serializes the directory item into a javascript array. This method should be overridden only when developing a custom FileBrowser control.

C#
public override void Serialize(StringWriter writer)
Parameters:writerStringWriter

a StringWriter used as a target for the serialization.

Overrides: FileBrowserItem.Serialize(StringWriter)

Serializes the children of the directory item as a javascript array. Recursively calls the Serialize methods of all child objects.

C#
public void SerializeContent(StringWriter writer)
Parameters:writerStringWriter

a StringWriter used as a target for the serialization.