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

Mono.Unix.UnixDirectoryInfo.SetCurrentDirectory Method

Sets the application's current working directory to the specified directory. [Edit]

public static void SetCurrentDirectory (string path)

See Also

Mono.Unix.Native.Syscall.chdir

Parameters

path
A string containing the path to which the current working directory is set. [Edit]

Exceptions

TypeReason
UnauthorizedAccessException The process cannot access path. [Mono.Unix.Native.Errno.EACCESS] [Edit]
System.IO.DirectoryNotFoundException A component of path is not a directory. [Mono.Unix.Native.Errno.ENOTDIR] [Edit]
System.IO.FileNotFoundExceptionpath does not exist. [Mono.Unix.Native.Errno.ENOENT] [Edit]
System.IO.PathTooLongExceptionpath is too long. [Mono.Unix.Native.Errno.ENAMETOOLONG] [Edit]
System.IO.IOException An I/O error occurred. [Mono.Unix.Native.Errno.EIO] [Edit]
Mono.Unix.UnixIOException Too many symbolic links were encountered in resolving path. [Mono.Unix.Native.Errno.ELOOP] [Edit]

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.
[Edit]

Requirements

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