Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SubFolderNode.cs
1using System.Threading.Tasks;
5
6namespace Waher.Things.Files
7{
12 {
17 {
18 }
19
23 [Page(2, "File System", 100)]
24 [Header(3, "Folder:")]
25 [ToolTip(4, "Full path to folder (on host).")]
26 public string FolderPath { get; set; }
27
31 public override string LocalId => FolderNode.GetLocalName(this.FolderPath);
32
38 public override Task<string> GetTypeNameAsync(Language Language)
39 {
40 return Language.GetStringAsync(typeof(FolderNode), 12, "Subfolder");
41 }
42
48 public override Task<bool> AcceptsChildAsync(INode Child)
49 {
50 return Task.FromResult(Child is SubFolderNode || Child is FileNode);
51 }
52
58 public override Task<bool> AcceptsParentAsync(INode Parent)
59 {
60 return Task.FromResult(Parent is FolderNode || Parent is SubFolderNode);
61 }
62 }
63}
Contains information about a language.
Definition: Language.cs:17
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
Definition: Language.cs:209
Represents a file in the file system.
Definition: FileNode.cs:13
Represents a file folder in the file system.
Definition: FolderNode.cs:44
Represents a subfolder in the file system.
override Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
string FolderPath
Full path to folder.
override Task< bool > AcceptsParentAsync(INode Parent)
If the node accepts a presumptive parent, i.e. can be added to that parent (if that parent accepts th...
override string LocalId
If provided, an ID for the node, but unique locally between siblings. Can be null,...
SubFolderNode()
Represents a subfolder in the file system.
override Task< bool > AcceptsChildAsync(INode Child)
If the node accepts a presumptive child, i.e. can receive as a child (if that child accepts the node ...
Virtual node, that can be used as a placeholder for services.
Definition: VirtualNode.cs:28
Interface for nodes that are published through the concentrator interface.
Definition: INode.cs:49
INode Parent
Parent Node, or null if a root node.
Definition: INode.cs:116