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

ReadWriteFileSystemProvider.SaveContent Method

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

SaveContent(NodeBase, NodeContent)

Override this method to implement a save content functionality for FileNode and DirectoryNode.

By default, this method is only called for files (instances of the class FileNode). To enable this method for directories (instances of DirectoryNode), add a new instance of FileSystemProviderSettings (with the property EnableGetContentMethodForDirectories set to true) to the ReadWriteFileSystemProvider(FileSystemProviderSettings) constructor.

If the instance of the NodeContent returned from the method GetContent(NodeBase, NodeContentParameters) has been created using the method NodeContent, then method SaveContent(NodeBase, NodeContent) IS NOT CALLED.

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 SaveContent(NodeBase node, NodeContent content)
Parameters
Type Name Description
NodeBase node

To be updated node.

NodeContent content

New content for the node.

Returns
Type Description
NodeBase

Up-to-date instance of DirectoryNode or FileNode which represents the updated 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.

In This Article
  • SaveContent(NodeBase, NodeContent)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies