Mono Class Library: Mono.Unix.Native.Syscall Overview | MembersMono.Unix.Native.Syscall.mknod Method |
Create a special file node. [Edit]
|
On success, zero is returned. On error, -1 is returned and Stdlib.GetLastError returns the translated error.
Usage
The mknod() system call will fail and the file will be not created if:
[Edit]
Error Details Errno.ENOTDIR A component of the path prefix is not a directory.
Errno.ENAMETOOLONG A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters.
Errno.ENOENT A component of the path prefix does not exist.
Errno.EACCES Search permission is denied for a component of the path prefix.
Errno.ELOOP Too many symbolic links were encountered in translating the pathname.
Errno.EPERM The process's effective user ID is not super-user.
Errno.EIO An I/O error occurred while making the directory entry or allocating the inode.
Errno.ENOSPC The directory in which the entry for the new node is being placed cannot be extended because there is no space left on the file system containing the directory.
Errno.ENOSPC There are no free inodes on the file system on which the node is being created.
Errno.EDQUOT The directory in which the entry for the new node is being placed cannot be extended because the user's quota of disk blocks on the file system containing the directory has been exhausted.
Errno.EDQUOT The user's quota of inodes on the file system on which the node is being created has been exhausted.
Errno.EROFS The named file resides on a read-only file system.
Errno.EEXIST The named file exists.
Errno.EFAULT The path argument points outside the process's allocated address space.
Errno.EINVAL Creating anything else than a block or character special file (or a whiteout ) is not supported.
The file system node path is created with the file type and access permissions specified in mode . The access permissions are modified by the process's umask value.
If mode indicates a block or character special file, dev is a configuration dependent specification denoting a particular device on the system. Otherwise, dev is ignored.
The mknod() system call requires super-user privileges.
[Edit]
Namespace: Mono.Unix.Native
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0