Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

ReadWriteFileSystemProvider.Delete Method

Namespace: Rebex.IO.FileSystem
Assembly: Rebex.FileSystem.dll (version 7.0.9147)

Delete(NodeBase)

Override this method to implement DirectoryNode and FileNode deletion.

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
NodeBase node

A DirectoryNode or FileNode to be deleted.

Returns
Type Description
NodeBase

Up-to-date instance of FileNode or DirectoryNode which represents the deleted node. If the method did not change anything important for the current representation of the node, you can return the node argument; otherwise you can create a new instance of DirectoryNode or FileNode.

Examples
protected override NodeBase Delete(NodeBase node)
{
 var toDeletePath = getFullPath(node.Path);
 if (node.IsDirectory)
 {
   Directory.Delete(toDeletePath);
 }
 else
 {
   File.Delete(toDeletePath);
 }
 return node;
}
In This Article
  • Delete(NodeBase)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies