Table of Contents

Class CygwinUtils

Namespace
NanoByte.Common.Native
Assembly
NanoByte.Common.dll

Provides access to Cygwin-related filesystem features. Cygwin provides Unix-like functionality on Windows systems.

public static class CygwinUtils
Inheritance
CygwinUtils

Methods

public static void CreateSymlink(string sourcePath, string targetPath)

Parameters

sourcePath string

The path of the link to create.

targetPath string

The path of the existing file or directory to point to (relative to sourcePath).

Exceptions

IOException

There was an IO problem writing the file.

UnauthorizedAccessException

Write access to the file was denied.

PlatformNotSupportedException

This method is called on a platform other than Windows.

Checks whether a file is a Cygwin symbolic link (http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks).

public static bool IsSymlink(string path)

Parameters

path string

The path of the file to check.

Returns

bool

true if path points to a symbolic link; false otherwise.

Exceptions

IOException

There was an IO problem reading the file.

UnauthorizedAccessException

Read access to the file was denied.

Checks whether a file is a Cygwin symbolic link (http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks).

public static bool IsSymlink(string path, out string target)

Parameters

path string

The path of the file to check.

target string

Returns the target the symbolic link points to if it exists.

Returns

bool

true if path points to a symbolic link; false otherwise.

Exceptions

IOException

There was an IO problem reading the file.

UnauthorizedAccessException

Read access to the file was denied.