Mono.Unix.UnixDirectoryInfo.GetEntries Method
Returnes the directory entries of all file system entries in the UnixFileSystemInfo.FullPath directory.

Syntax

public Mono.Unix.Native.Dirent[] GetEntries ()

Returns

A Mono.Unix.Native.Dirent array containing all file system entries within the UnixFileSystemInfo.FullPath directory.

Exceptions

TypeReason
UnauthorizedAccessException The process cannot access UnixFileSystemInfo.FullPath. [Mono.Unix.Native.Errno.EACCESS]
System.IO.DirectoryNotFoundException UnixFileSystemInfo.FullPath is not a directory. [Mono.Unix.Native.Errno.ENOTDIR]
System.IO.FileNotFoundException UnixFileSystemInfo.FullPath doesn't exist, or is an empty string. [Mono.Unix.Native.Errno.ENOENT]
Mono.Unix.UnixIOException

Insufficient memory to complete the operation. [Mono.Unix.Native.Errno.ENOMEM]

-or-

Too many file descriptors in use by the process. [Mono.Unix.Native.Errno.EMFILE]

-or-

Too many files are currently open in the system. [Mono.Unix.Native.Errno.ENFILE]

Remarks

The Mono.Unix.Native.Dirent.d_name field of the returned Mono.Unix.Native.Dirent instances only contains the file system entry name, not the fully qualified file system entry name. Thus, to use these values in further code they must be qualified with UnixFileSystemInfo.FullName, e.g. UnixPath.Combine (UnixFileSystemInfo.FullName, dirent[index].Mono.Unix.Native.Dirent.d_name).

Requirements

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