Previous section.

Protocols for Interworking: XNFS, Version 3W
Copyright © 1998 The Open Group

Name

NFSPROC_CREATE - Create File

Call Arguments

struct createargs { diropargs where; sattr attributes; };

diropargs and sattr are defined in Basic Data Types .

Return Arguments

union diropres switch (stat status) { case NFS_OK: struct diropok diropok; default: void; };

fhandle, fattr and stat are defined in Basic Data Types .

RPC Procedure Description

diropres NFSPROC_CREATE(createargs) = 9;

Description

The file name is created in the directory given by dir. The initial attributes of the new file are given by diropok.attributes. A reply status of NFS_OK indicates that the file was created, and reply diropok.file and reply attributes are its file handle and attributes. Any other reply status means that the operation failed and no file was created.

This procedure is used to create regular files only; directories may be created by the NFSPROC_MKDIR procedure (see Name ).

Note that this call will succeed even if the file already exists.

Return Codes

NFS_OK
Indicates that the call completed successfully and the results are valid.

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_ISDIR
Is a directory. The caller specified a directory in a non-directory operation.

NFSERR_NOSPC
No space left on device. The operation caused the server's file system to reach its limit.

NFSERR_ROFS
Read-only file system. Write attempted on a read-only file system.

NFSERR_NAMETOOLONG

File name too long. The filename in an operation was too long.

NFSERR_DQUOT
Disk quota exceeded. The client's disk quota on the server has been exceeded.

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.


Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index