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

ReadWriteFileSystemProvider.CreateFile Method

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

CreateFile(DirectoryNode, FileNode)

Override this method to implement FileNode creation.

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 FileNode CreateFile(DirectoryNode parent, FileNode child)
Parameters
Type Name Description
DirectoryNode parent

Parent DirectoryNode that contains child.

FileNode child

To be created FileNode.

Returns
Type Description
FileNode

An up-to-date instance of FileNode which represents the created child. If the method did not change anything important for the current representation of the node, you can return the child argument; otherwise you can create a new instance of FileNode.

Examples
protected override FileNode CreateFile(DirectoryNode parent, FileNode child)
{
 var newFileFullPath = getFullPath(child.Path);
 File.Create(newFileFullPath).Close();

 return child;
}
In This Article
  • CreateFile(DirectoryNode, FileNode)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies