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

MountCapableFileSystemProvider.Mount Method

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

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 targetDirectoryPath is logically attached.

FileSystemProvider targetProvider

FileSystemProvider to be mounted.

NodePath targetDirectoryPath

Path of the directory in the targetProvider to be mounted at the mountDirectoryPath.

Returns
Type Description
DirectoryNode

A DirectoryNode on which a targetDirectoryPath is logically attached.

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 targetDirectory is logically attached.

DirectoryNode targetDirectory

Directory to be mounted at the mountDirectoryPath.

Returns
Type Description
DirectoryNode

A DirectoryNode on which a targetDirectory is logically attached.

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 targetProvider is logically attached.

FileSystemProvider targetProvider

FileSystemProvider to be mounted.

Returns
Type Description
DirectoryNode

A DirectoryNode on which a targetProvider is logically attached.

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);
In This Article
  • Mount(NodePath, FileSystemProvider, NodePath)
  • Mount(NodePath, DirectoryNode)
  • Mount(NodePath, FileSystemProvider)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies