Class FileSystemDataSource
The DataSourceControl for UnifiedFileSystem. The control is both a hierarchical and a tabular datasource.
Inheritance
Implements
Namespace: EPiServer.Web.WebControls
Assembly: EPiServer.Web.WebControls.dll
Version: 8.11.0Syntax
public class FileSystemDataSource : Control, IDataSource, IListSource, IHierarchicalDataSource, IDataSourceMethods
Constructors
FileSystemDataSource()
Declaration
public FileSystemDataSource()
Fields
DataKeyName
Declaration
public static readonly string DataKeyName
Field Value
Type | Description |
---|---|
System.String |
Properties
ContainsListCollection
Indicates that the control contatins an IList collection
Declaration
public bool ContainsListCollection { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
DeleteParameters
Gets the parameters collection that contains the parameters that are used when deleteing files or directories.
Declaration
public ParameterCollection DeleteParameters { get; }
Property Value
Type | Description |
---|---|
System.Web.UI.WebControls.ParameterCollection |
HideFilesFromList
Indicates if the File list should be hidden from the list. By default it will display the files in list.
Declaration
public virtual bool HideFilesFromList { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
HierarchicalViews
The hierarchical views for the datasource
Declaration
protected Dictionary<string, FileSystemHierarchicalView> HierarchicalViews { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, FileSystemHierarchicalView> |
IncludeRoot
Indicates if the root should be included. Only meaningful with hierarchical use
Declaration
public virtual bool IncludeRoot { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
InsertParameters
Gets the parameters collection that contains the parameters that are used when updating files or directories.
Declaration
public ParameterCollection InsertParameters { get; }
Property Value
Type | Description |
---|---|
System.Web.UI.WebControls.ParameterCollection |
Root
Indicates at which path the DataSource should be "rooted"
Declaration
public virtual string Root { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SelectParameters
Gets the parameters collection that contains the parameters that are used when selecting files or directories.
Declaration
public ParameterCollection SelectParameters { get; }
Property Value
Type | Description |
---|---|
System.Web.UI.WebControls.ParameterCollection |
SelectSingleItem
Indicates if the select should only return a single item. Only meaningful with tabular use
Declaration
public virtual bool SelectSingleItem { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
SortOrder
Get or set in which order the files/directories should be sorted
Declaration
public virtual FileSortOrder SortOrder { get; set; }
Property Value
Type | Description |
---|---|
FileSortOrder |
UpdateParameters
Gets the parameters collection that contains the parameters that are used when updating files or directories.
Declaration
public ParameterCollection UpdateParameters { get; }
Property Value
Type | Description |
---|---|
System.Web.UI.WebControls.ParameterCollection |
View
Gets the supported view
Declaration
protected virtual GenericDataSourceView<FileSystemDataSource> View { get; }
Property Value
Type | Description |
---|---|
GenericDataSourceView<FileSystemDataSource> |
Methods
Delete(IDictionary)
Deletes an UnifiedFile or UnifiedDirectory given its Path
Declaration
public virtual int Delete(IDictionary values)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IDictionary | values |
Returns
Type | Description |
---|---|
System.Int32 |
Remarks
Path can be given in DeleteParameters
GetHierarchicalView(String)
Returns an hierarchical view
Declaration
public HierarchicalDataSourceView GetHierarchicalView(string viewPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewPath | the path for the view |
Returns
Type | Description |
---|---|
System.Web.UI.HierarchicalDataSourceView | hierarcical view |
GetList()
Returns an IList collection
Declaration
public IList GetList()
Returns
Type | Description |
---|---|
System.Collections.IList |
GetView(String)
Returns a view for tabular use
Declaration
public DataSourceView GetView(string viewName)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewName | name of view |
Returns
Type | Description |
---|---|
System.Web.UI.DataSourceView |
GetViewNames()
Returns all supported tabular views
Declaration
public ICollection GetViewNames()
Returns
Type | Description |
---|---|
System.Collections.ICollection | Collection of views |
Insert(IDictionary)
Not supported
Declaration
public virtual int Insert(IDictionary values)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IDictionary | values |
Returns
Type | Description |
---|---|
System.Int32 |
OnDataSourceChanged(EventArgs)
Raises the DataSourceChanged event.
Declaration
protected virtual void OnDataSourceChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Select(DataSourceSelectArguments)
Performs an tabular select given arguments
Declaration
public virtual IEnumerable Select(DataSourceSelectArguments arguments)
Parameters
Type | Name | Description |
---|---|---|
System.Web.UI.DataSourceSelectArguments | arguments | select arguments |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | Collection that matches select |
Remarks
SelectParameters can be used to specify path
Update(IDictionary)
Updates an UnifiedDirectory or UnifiedFile given parameters
Declaration
public virtual int Update(IDictionary values)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IDictionary | values |
Returns
Type | Description |
---|---|
System.Int32 |
Remarks
UpdateParameters collection can be used
Events
DataSourceChanged
Raised when some setting on DataSource changed, users should rebind
Declaration
public event EventHandler DataSourceChanged
Event Type
Type | Description |
---|---|
System.EventHandler |
ResolveDirectoryImageUrl
Declaration
public event ResolveDirectoryImageEventHandler ResolveDirectoryImageUrl
Event Type
Type | Description |
---|---|
ResolveDirectoryImageEventHandler |
ResolveFileImageUrl
Declaration
public event ResolveFileImageEventHandler ResolveFileImageUrl
Event Type
Type | Description |
---|---|
ResolveFileImageEventHandler |