DirectoryInfoCreateJunction Method (String, Boolean) |
[AlphaFS] Converts the
DirectoryInfo instance into a directory junction instance (similar to CMD command: "MKLINK /J").
Remarks
The directory must be empty and reside on a local volume.
MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,
and a junction can link directories located on different local volumes on the same computer.
Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.
Namespace:
Alphaleonis.Win32.Filesystem
Assembly:
AlphaFS (in AlphaFS.dll) Version: 2.2
Syntax public void CreateJunction(
string junctionPath,
bool overwrite
)
Public Sub CreateJunction (
junctionPath As String,
overwrite As Boolean
)
public:
void CreateJunction(
String^ junctionPath,
bool overwrite
)
member CreateJunction :
junctionPath : string *
overwrite : bool -> unit
Parameters
- junctionPath
- Type: SystemString
The path of the junction point to create. - overwrite
- Type: SystemBoolean
to overwrite an existing junction point. The directory is removed and recreated.
Exceptions See Also