NanoByte.Common 2.10.6
NanoByte.Common.Native.CygwinUtils Class Reference

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

Static Public Member Functions

static bool IsSymlink ([Localizable(false)] string path)
 Checks whether a file is a Cygwin symbolic link (http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks). More...
 
static bool IsSymlink ([Localizable(false)] string path, [MaybeNullWhen(false)] out string target)
 Checks whether a file is a Cygwin symbolic link (http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks). More...
 
static void CreateSymlink ([Localizable(false)] string sourcePath, [Localizable(false)] string targetPath)
 Creates a new Cygwin symbolic link (http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks). More...
 

Static Package Attributes

static readonly byte[] SymlinkCookie = Encoding.ASCII.GetBytes("!<symlink>")
 Byte sequence used to mark the start of a Cygwin symlink file.
 

Detailed Description

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

Member Function Documentation

◆ CreateSymlink()

static void NanoByte.Common.Native.CygwinUtils.CreateSymlink ( [Localizable(false)] string  sourcePath,
[Localizable(false)] string  targetPath 
)
inlinestatic

Creates a new Cygwin symbolic link (http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks).

Parameters
sourcePathThe path of the link to create.
targetPathThe path of the existing file or directory to point to (relative to sourcePath ).
Exceptions
IOExceptionThere was an IO problem writing the file.
UnauthorizedAccessExceptionWrite access to the file was denied.
PlatformNotSupportedExceptionThis method is called on a platform other than Windows.

◆ IsSymlink() [1/2]

static bool NanoByte.Common.Native.CygwinUtils.IsSymlink ( [Localizable(false)] string  path)
static

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

Parameters
pathThe path of the file to check.
Returns
true if path points to a symbolic link; false otherwise.
Exceptions
IOExceptionThere was an IO problem reading the file.
UnauthorizedAccessExceptionRead access to the file was denied.

◆ IsSymlink() [2/2]

static bool NanoByte.Common.Native.CygwinUtils.IsSymlink ( [Localizable(false)] string  path,
[MaybeNullWhen(false)] out string  target 
)
inlinestatic

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

Parameters
pathThe path of the file to check.
targetReturns the target the symbolic link points to if it exists.
Returns
true if path points to a symbolic link; false otherwise.
Exceptions
IOExceptionThere was an IO problem reading the file.
UnauthorizedAccessExceptionRead access to the file was denied.

The documentation for this class was generated from the following file: