MountCapableFileSystemProvider.Mount Method
Namespace: Rebex.IO.FileSystem
Assembly: Rebex.FileSystem.dll (version 8.0.9673)
Mount(NodePath, FileSystemProvider, NodePath)
Mounts a file system found on targetDirectoryPath in the targetProvider at the mountDirectoryPath.
Declaration
public DirectoryNode Mount(NodePath mountDirectoryPath, FileSystemProvider targetProvider, NodePath targetDirectoryPath)
Parameters
| Type | Name | Description |
|---|---|---|
| NodePath | mountDirectoryPath | A mount point on which a |
| FileSystemProvider | targetProvider | FileSystemProvider to be mounted. |
| NodePath | targetDirectoryPath | Path of the directory in the |
Returns
| Type | Description |
|---|---|
| DirectoryNode | A DirectoryNode on which a |
Examples
// create new MemoryFileSystemProvider
var memoryProvider = new MemoryFileSystemProvider();
// create to be mounted directory.
var mySpecialDir = new DirectoryNode("SpecialDir", memoryProvider.Root).Create() as DirectoryNode;
// mount memoryProvider directory with name mySpecialDir at the directory /tmp/mySpecialDir
mountCapableFileProvider.Mount("/tmp/mySpecialDir", memoryProvider, "/SpecialDir");
Mount(NodePath, DirectoryNode)
Mounts a file system found on targetDirectory at the mountDirectoryPath.
Declaration
public DirectoryNode Mount(NodePath mountDirectoryPath, DirectoryNode targetDirectory)
Parameters
| Type | Name | Description |
|---|---|---|
| NodePath | mountDirectoryPath | A mount point on which a |
| DirectoryNode | targetDirectory | Directory to be mounted at the |
Returns
| Type | Description |
|---|---|
| DirectoryNode | A DirectoryNode on which a |
Examples
// create new MemoryFileSystemProvider
var memoryProvider = new MemoryFileSystemProvider();
// create to be mounted directory
var mySpecialDir = new DirectoryNode("SpecialDir", memoryProvider.Root).Create() as DirectoryNode;
// mount mySpecialDir at the directory /tmp/mySpecialDir
mountCapableFileProvider.Mount("/tmp/mySpecialDir", mySpecialDir);
Mount(NodePath, FileSystemProvider)
Mounts a file system found on root directory in the targetProvider at the mountDirectoryPath.
Declaration
public DirectoryNode Mount(NodePath mountDirectoryPath, FileSystemProvider targetProvider)
Parameters
| Type | Name | Description |
|---|---|---|
| NodePath | mountDirectoryPath | A mount point on which a |
| FileSystemProvider | targetProvider | FileSystemProvider to be mounted. |
Returns
| Type | Description |
|---|---|
| DirectoryNode | A DirectoryNode on which a |
Examples
// create new memory provider
var memoryProvider = new MemoryFileSystemProvider();
// create LocalFileSystemProvider for path C:\
var cFs = new LocalFileSystemProvider(C_DRIVE_PATH);
// create LocalFileSystemProvider for path D:\
var dFs = new LocalFileSystemProvider(D_DRIVE_PATH);
// mount file system providers
mountCapableFileSystem.Mount("/C", cFs);
mountCapableFileSystem.Mount("/D", dFs);
mountCapableFileSystem.Mount("/Temp", memoryProvider);