ReadWriteFileSystemProvider.GetChild Method
Namespace: Rebex.IO.FileSystem
Assembly: Rebex.FileSystem.dll (version 7.0.9147)
GetChild(String, DirectoryNode)
Override this method to implement retrieval of Directoryname
located in the specified parent
directory.
When the virtual file system is used in the FileServer component, the server session, which contains information about the user and the active connection, can be accessed using Current property.
Inherited from ReadDeclaration
protected abstract NodeBase GetChild(string name, DirectoryNode parent)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of the child node to be returned. |
Directory |
parent | Parent Directory |
Returns
Type | Description |
---|---|
Node |
A Directory |
Examples
protected override NodeBase GetChild(string name, DirectoryNode parent)
{
var fullChildPath = getFullPath(parent.Path.AddPathPart(name));
if (File.Exists(fullChildPath))
{
return new FileNode(name, parent);
}
if (Directory.Exists(fullChildPath))
{
return new DirectoryNode(name, parent);
}
}
return null;