Class CygwinUtils
Provides access to Cygwin-related filesystem features. Cygwin provides Unix-like functionality on Windows systems.
public static class CygwinUtils
- Inheritance
-
objectCygwinUtils
Methods
CreateSymlink(string, string)
Creates a new Cygwin symbolic link (http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks).
public static void CreateSymlink(string sourcePath, string targetPath)
Parameters
sourcePathstringThe path of the link to create.
targetPathstringThe 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.
IsSymlink(string)
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
pathstringThe path of the file to check.
Returns
- bool
trueifpathpoints to a symbolic link;falseotherwise.
Exceptions
- 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).
public static bool IsSymlink(string path, out string target)
Parameters
pathstringThe path of the file to check.
targetstringReturns the target the symbolic link points to if it exists.
Returns
- bool
trueifpathpoints to a symbolic link;falseotherwise.
Exceptions
- IOException
There was an IO problem reading the file.
- UnauthorizedAccessException
Read access to the file was denied.