C# 클래스 WindowsPathUnitTest.JunctionPoint

Provides access to NTFS junction points in .Net.
파일 보기 프로젝트 열기: nemec/pathlib 1 사용 예제들

공개 메소드들

메소드 설명
Create ( string junctionPoint, string targetDir, bool overwrite ) : void

Creates a junction point from the specified directory to the specified target directory.

Only works on NTFS.

Delete ( string junctionPoint ) : void

Deletes a junction point at the specified source directory along with the directory itself. Does nothing if the junction point does not exist.

Only works on NTFS.

Exists ( string path ) : bool

Determines whether the specified path exists and refers to a junction point.

GetTarget ( string junctionPoint ) : string

Gets the target of the specified junction point.

Only works on NTFS.

비공개 메소드들

메소드 설명
CreateFile ( string lpFileName, EFileAccess dwDesiredAccess, EFileShare dwShareMode, IntPtr lpSecurityAttributes, ECreationDisposition dwCreationDisposition, EFileAttributes dwFlagsAndAttributes, IntPtr hTemplateFile ) : IntPtr
DeviceIoControl ( IntPtr hDevice, uint dwIoControlCode, IntPtr InBuffer, int nInBufferSize, IntPtr OutBuffer, int nOutBufferSize, int &pBytesReturned, IntPtr lpOverlapped ) : bool
InternalGetTarget ( SafeFileHandle handle ) : string
OpenReparsePoint ( string reparsePoint, EFileAccess accessMode ) : SafeFileHandle
ThrowLastWin32Error ( string message ) : void

메소드 상세

Create() 공개 정적인 메소드

Creates a junction point from the specified directory to the specified target directory.
Only works on NTFS.
Thrown when the junction point could not be created or when /// an existing directory was found and if false
public static Create ( string junctionPoint, string targetDir, bool overwrite ) : void
junctionPoint string The junction point path
targetDir string The target directory
overwrite bool If true overwrites an existing reparse point or empty directory
리턴 void

Delete() 공개 정적인 메소드

Deletes a junction point at the specified source directory along with the directory itself. Does nothing if the junction point does not exist.
Only works on NTFS.
public static Delete ( string junctionPoint ) : void
junctionPoint string The junction point path
리턴 void

Exists() 공개 정적인 메소드

Determines whether the specified path exists and refers to a junction point.
Thrown if the specified path is invalid /// or some other error occurs
public static Exists ( string path ) : bool
path string The junction point path
리턴 bool

GetTarget() 공개 정적인 메소드

Gets the target of the specified junction point.
Only works on NTFS.
Thrown when the specified path does not /// exist, is invalid, is not a junction point, or some other error occurs
public static GetTarget ( string junctionPoint ) : string
junctionPoint string The junction point path
리턴 string