SharpFS -- A Virtual FileSystem for .NET

VirtualFS.MountAlias Method 

[This is preliminary documentation and subject to change.]

Creates an alias in the file system.

public void MountAlias(
   string aliasPath,
   string targetPath


The name of the alias to be created.
The virtual path to which this alias points.


There are no limitations on where an alias may point. The target path is not checked for validity at mount time. Most importantly, there are no built in mechanisms to prevent cycles caused by aliases. Some care should be taken in how aliases are created and where they are mapped to, otherwise calls into the filesystem may recurse infinitely, resulting in a stack overflow.


Exception Type Condition
InvalidOperationException Thrown if AllowAliases is set to false.
ArgumentNullException Thrown if aliasPath or targetPath is null.

See Also

VirtualFS Class | SharpFS Namespace