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

Mono.Unix.UnixFileInfo Constructor

Creates a new Mono.Unix.UnixFileInfo instance containing information about the file path.

public UnixFileInfo (string path)

Parameters

path
A string containing the file 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 .Mono.Unix.UnixDirectoryInfo.GetCurrentDirectory.

It is valid to construct Mono.Unix.UnixFileInfo objects for files that do not exist or for directories. However, attempts to use the Mono.Unix.UnixFileInfo instance may generate InvalidOperationExceptions. Use UnixFileSystemInfo.Exists to see if path exists and UnixFileSystemInfo.IsFile to ensure that path is a file.

Requirements

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