Class CygwinUtils
Provides access to Cygwin-related filesystem features. Cygwin provides Unix-like functionality on Windows systems.
public static class CygwinUtils
- Inheritance
-
CygwinUtils
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
sourcePath
stringThe path of the link to create.
targetPath
stringThe 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
path
stringThe path of the file to check.
Returns
- bool
true
ifpath
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.
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
path
stringThe path of the file to check.
target
stringReturns the target the symbolic link points to if it exists.
Returns
- bool
true
ifpath
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.