Class FileSystemItemBase
The base class for all file system items in the view.
Inheritance
Namespace: Phoenix.DeviceStorage
Assembly: Phoenix.Plugin.DeviceStorage.dll
Syntax
public abstract class FileSystemItemBase : BindableBase
Constructors
View SourceFileSystemItemBase(String, FileSystemItemBase, IDevice, IDeviceStorageManager)
Initializes a new instance of the FileSystemItemBase class.
Declaration
protected FileSystemItemBase(string name, FileSystemItemBase parent, IDevice device, IDeviceStorageManager fileManager)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the item. |
FileSystemItemBase | parent | The parent. |
IDevice | device | The device this file system item is for. |
IDeviceStorageManager | fileManager | The file manager for this io operations. |
Properties
View SourceAllChildren
Gets the children of this file system item.
Declaration
public ObservableCollection<FileSystemItemBase> AllChildren { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<FileSystemItemBase> |
AllChildrenLoaded
Gets a value indicating whether the children have been loaded.
Declaration
public bool AllChildrenLoaded { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Device
Gets the device for this file system item.
Declaration
public IDevice Device { get; }
Property Value
Type | Description |
---|---|
IDevice |
Directories
Gets the children of this file system item.
Declaration
public ObservableCollection<FileSystemItemBase> Directories { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<FileSystemItemBase> |
DirectoriesLoaded
Gets a value indicating whether the children directories have been loaded.
Declaration
public bool DirectoriesLoaded { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
FileManager
Gets the FileManager to use for file io operations.
Declaration
public IDeviceStorageManager FileManager { get; }
Property Value
Type | Description |
---|---|
IDeviceStorageManager |
FullName
Gets or sets full name.
Declaration
public string FullName { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
IsCollapsible
Gets or sets a value indicating whether this item can be collapsed.
Declaration
public bool IsCollapsible { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsExpanded
Gets or sets a value indicating whether this item is expanded.
Declaration
public bool IsExpanded { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsSelected
Gets or sets a value indicating whether this instance is selected.
Declaration
public bool IsSelected { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
Gets or sets the name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Parent
Gets the parent.
Declaration
public FileSystemItemBase Parent { get; }
Property Value
Type | Description |
---|---|
FileSystemItemBase |
Methods
View SourceFindChildDirectoryByNameAsync(String, Boolean)
Finds a FileSystemItemBase within the children collection by name.
Declaration
public async Task<FileSystemItemBase> FindChildDirectoryByNameAsync(string childName, bool ignoreCase)
Parameters
Type | Name | Description |
---|---|---|
System.String | childName | The name of the FileSystemItemBase. |
System.Boolean | ignoreCase | True if case should be ignored, false if not. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<FileSystemItemBase> | The found FileSystemItemBase or null if it cannot be found. |
LoadAllChildrenAsync()
Performs the loading of all items (Directories and Files).
Declaration
protected abstract Task<Collection<FileSystemItemBase>> LoadAllChildrenAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.ObjectModel.Collection<FileSystemItemBase>> | A collection of all file system children. |
LoadDirectoriesAsync()
Performs the loading of only directory objects.
Declaration
protected abstract Task<Collection<FileSystemItemBase>> LoadDirectoriesAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.ObjectModel.Collection<FileSystemItemBase>> | A collection of all directory children. |
RefreshAllCollection()
Refreshes all children
Declaration
public void RefreshAllCollection()
RefreshDirectories()
Refreshes all directories
Declaration
public void RefreshDirectories()