NFSPROC_REMOVE - Remove File
- struct diropargs { fhandle dir; filename name; };
fhandle and filename are defined in
Basic Data Types .
- stat status;
stat is defined in
Basic Data Types .
- stat NFSPROC_REMOVE(diropargs) = 10;
The file name is removed from the directory given by dir. A reply of NFS_OK means the directory entry was removed. Any other return value indicates an error, and the file was not removed. This procedure may be used to remove any of the supported file types except directories. Removal of directories must be performed using the NFSPROC_RMDIR procedure (see
Name ).Note that this is generally a non-idempotent operation. A server should attempt to provide this function in an idempotent fashion. X/Open-compliant systems allow removal of open files. A process can open a file and, while it is open, remove it from the directory. The file can be read and written as long as the process keeps it open, even though the file has no name in the file system. It is impossible for a stateless server to implement these semantics.
- NFS_OK
- Indicates that the call completed successfully and the results are valid.
- NFSERR_NOENT
- No such file or directory. The file or directory specified does not exist.
- NFSERR_IO
- Some sort of hard error occurred when the operation was in progress. This could be a disk error, for example.
- NFSERR_ACCES
- Permission denied. The caller does not have the correct permission to perform the requested operation.
- NFSERR_NOTDIR
- Not a directory. The caller specified a non-directory in a directory operation.
- NFSERR_ISDIR
- Is a directory. The caller specified a directory in a non-directory operation.
- NFSERR_NAMETOOLONG
File name too long. The filename in an operation was too long.
- NFSERR_ROFS
- Read-only file system. Write attempted on a read-only file system.
- NFSERR_STALE
- The fhandle given in the arguments was invalid. That is, the file referred to by that file handle no longer exists, or access to it has been revoked.
Contents | Next section | Index |