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

Mono.Unix.UnixFileSystemInfo.Delete Method

Deletes the file system entry UnixFileSystemInfo.FullName.

public abstract void Delete ()

Exceptions

TypeReason
InvalidOperationException

The filesystem containing UnixFileSystemInfo.FullName does not support the removal of file system entries.

-or-

The directory containing UnixFileSystemInfo.FullName has the FileSpecialAttributes.Sticky bit set and the process's UnixEnvironment.EffectiveUserId is neither the uid of the file to be deleted nor that of the directory containing it.

UnauthorizedAccessException

Write access to the directory containing UnixFileSystemInfo.FullName was not allowed for the processe's effective user id UnixEnvironment.EffectiveUserId.

-or-

One of the directories in UnixFileSystemInfo.FullName did not have search (execute) permissions.

System.IO.DirectoryNotFoundException A component of UnixFileSystemInfo.FullName is not a directory.
System.IO.FileNotFoundExceptionUnixFileSystemInfo.FullName does not exist.
System.IO.IOException

UnixFileSystemInfo.FullName contains files other than '.' and '..' in it.

-or-

An I/O error occurred while deleting the file system entry or deallocating the inode.

-or-

The directory entry to be removed resides in a read-only file system.

System.IO.PathTooLongExceptionUnixFileSystemInfo.FullName was too long.
Mono.Unix.UnixIOException

Too many symbolic links were encountered in translating UnixFileSystemInfo.FullName.

-or

The directory to be removed is the mount point for a mounted filesystem.

Remarks

Requirements

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