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

ReadWriteFileSystemProvider.SetAttributes Method

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

SetAttributes(NodeBase, NodeAttributes)

Override this method to implement a attribute updating functionality for FileNode and DirectoryNode.

Default implementation do nothing and returns node.

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 virtual NodeBase SetAttributes(NodeBase node, NodeAttributes attributes)
Parameters
Type Name Description
NodeBase node

To be updated a FileNode or DirectoryNode.

NodeAttributes attributes

Updated NodeAttributes 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.

Examples
protected override NodeBase SetAttributes(NodeBase node, NodeAttributes attributes)
{
var fullNodePath = getFullPath(node.Path);
if (node.IsFile)
{
  File.SetAttributes(fullNodePath, attributes.FileAttributes);
  return new FileNode(node.Name, node.Parent, node.TimeInfo, attributes);
}
return node;
}
In This Article
  • SetAttributes(NodeBase, NodeAttributes)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies