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

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 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
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies