ReadWriteFileSystemProvider.Delete Method
Namespace: Rebex.IO.FileSystem
Assembly: Rebex.FileSystem.dll (version 7.0.9147)
Delete(NodeBase)
Override this method to implement 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.
Declaration
protected abstract NodeBase Delete(NodeBase node)
Parameters
Type | Name | Description |
---|---|---|
Node |
node | A Directory |
Returns
Type | Description |
---|---|
Node |
Up-to-date instance of File |
Examples
protected override NodeBase Delete(NodeBase node)
{
var toDeletePath = getFullPath(node.Path);
if (node.IsDirectory)
{
Directory.Delete(toDeletePath);
}
else
{
File.Delete(toDeletePath);
}
return node;
}