Class CygwinUtils
Provides access to Cygwin-related filesystem features. Cygwin provides Unix-like functionality on Windows systems.
Namespace: NanoByte.Common.Native
Assembly: NanoByte.Common.dll
Syntax
public static class CygwinUtils : Object
Methods
CreateSymlink(String, String)
Creates a new Cygwin symbolic link (http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks).
Declaration
public static void CreateSymlink(string sourcePath, string targetPath)
Parameters
Type | Name | Description |
---|---|---|
String | sourcePath | The path of the link to create. |
String | targetPath | The path of the existing file or directory to point to (relative to |
Exceptions
Type | Condition |
---|---|
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. |
IsSymlink(String)
Checks whether a file is a Cygwin symbolic link (http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks).
Declaration
public static bool IsSymlink(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path of the file to check. |
Returns
Type | Description |
---|---|
Boolean |
|
Exceptions
Type | Condition |
---|---|
IOException | There was an IO problem reading the file. |
UnauthorizedAccessException | Read access to the file was denied. |
IsSymlink(String, out String)
Checks whether a file is a Cygwin symbolic link (http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks).
Declaration
public static bool IsSymlink(string path, out string target)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path of the file to check. |
String | target | Returns the target the symbolic link points to if it exists. |
Returns
Type | Description |
---|---|
Boolean |
|
Exceptions
Type | Condition |
---|---|
IOException | There was an IO problem reading the file. |
UnauthorizedAccessException | Read access to the file was denied. |