ReadWriteFileSystemProvider.SetAttributes Method
Namespace: Rebex.IO.FileSystem
Assembly: Rebex.FileSystem.dll (version 7.0.9119)
SetAttributes(NodeBase, NodeAttributes)
Override this method to implement a attribute updating functionality for File
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 |
---|---|---|
Node |
node | To be updated a File |
Node |
attributes | Updated Node |
Returns
Type | Description |
---|---|
Node |
Up-to-date instance of Directory |
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;
}