MountCapableFileSystemProvider.Mount Method
Namespace: Rebex.IO.FileSystem
Assembly: Rebex.FileSystem.dll (version 7.0.9119)
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);