Mono Class Library: Mono.Unix.UnixSymbolicLinkInfo Overview | Members

Mono.Unix.UnixSymbolicLinkInfo Constructor

Creates a new Mono.Unix.UnixSymbolicLinkInfo instance containing information about the symbolic link.

public UnixSymbolicLinkInfo (string path)

Parameters

path
A string containing the symbolic link to query.

Exceptions

TypeReason
ArgumentNullExceptionpath is null.
ArgumentExceptionpath contains invalid characters; see UnixPath.GetInvalidPathChars.

Remarks

The path argument is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory.

Note: To obtain the current working directory, see UnixDirectoryInfo.GetCurrentDirectory.

It is valid to construct Mono.Unix.UnixSymbolicLinkInfo objects for symbolic links that do not exist or for files and directories. However, attempts to use the Mono.Unix.UnixSymbolicLinkInfo instance may generate InvalidOperationExceptions and other exception types. Use UnixFileSystemInfo.Exists to see if path exists, UnixFileSystemInfo.IsSymbolicLink to ensure that path is a symbolic link, and Use UnixSymbolicLinkInfo.HasContents to ensure that the symbolic link target is valid.

Requirements

Namespace: Mono.Unix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0