blank.gif (43 bytes)

Church Of The
Swimming Elephant

Search:
3.3.13 Procedure 13: RMDIR - Remove a Directory Connected: An Internet Encyclopedia
3.3.13 Procedure 13: RMDIR - Remove a Directory

Up: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1813
Up: 3. Server Procedures
Up: 3.3. Procedure Descriptions
Prev: 3.3.12 Procedure 12: REMOVE - Remove a File
Next: 3.3.14 Procedure 14: RENAME - Rename a File or Directory

3.3.13 Procedure 13: RMDIR - Remove a Directory

3.3.13 Procedure 13: RMDIR - Remove a Directory

SYNOPSIS

      RMDIR3res NFSPROC3_RMDIR(RMDIR3args) = 13;

      struct RMDIR3args {
           diropargs3  object;
      };

      struct RMDIR3resok {
           wcc_data    dir_wcc;
      };

      struct RMDIR3resfail {
           wcc_data    dir_wcc;
      };

      union RMDIR3res switch (nfsstat3 status) {
      case NFS3_OK:
           RMDIR3resok   resok;
      default:
           RMDIR3resfail resfail;
      };

DESCRIPTION

Procedure RMDIR removes (deletes) a subdirectory from a directory. If the directory entry of the subdirectory is the last reference to the subdirectory, the subdirectory may be destroyed. On entry, the arguments in RMDIR3args are:

object

A diropargs3 structure identifying the directory entry to be removed:

dir

The file handle for the directory from which the subdirectory is to be removed.

name

The name of the subdirectory to be removed. Refer to General comments on filenames on page 30.

On successful return, RMDIR3res.status is NFS3_OK and RMDIR3res.resok contains:

dir_wcc

Weak cache consistency data for the directory, object.dir. For a client that requires only the post-RMDIR directory attributes, these can be found in dir_wcc.after.

Otherwise, RMDIR3res.status contains the error on failure and RMDIR3res.resfail contains the following:

dir_wcc

Weak cache consistency data for the directory, object.dir. For a client that requires only the post-RMDIR directory attributes, these can be found in dir_wcc.after. Note that even though the RMDIR failed, full wcc_data is returned to allow the client to determine whether the failing RMDIR changed the directory.

IMPLEMENTATION

Note that on some servers, removal of a non-empty directory is disallowed.

On some servers, the filename, ".", is illegal. These servers will return the error, NFS3ERR_INVAL. On some servers, the filename, "..", is illegal. These servers will return the error, NFS3ERR_EXIST. This would seem inconsistent, but allows these servers to comply with their own specific interface definitions. Clients should be prepared to handle both cases.

The client should not rely on the resources (disk space, directory entry, and so on.) formerly associated with the directory becoming immediately available.

ERRORS

NFS3ERR_NOENT NFS3ERR_IO NFS3ERR_ACCES NFS3ERR_INVAL NFS3ERR_EXIST NFS3ERR_NOTDIR NFS3ERR_NAMETOOLONG NFS3ERR_ROFS NFS3ERR_NOTEMPTY NFS3ERR_STALE NFS3ERR_BADHANDLE NFS3ERR_NOTSUPP NFS3ERR_SERVERFAULT

SEE ALSO REMOVE.


Next: 3.3.14 Procedure 14: RENAME - Rename a File or Directory

Connected: An Internet Encyclopedia
3.3.13 Procedure 13: RMDIR - Remove a Directory

Cotse.Net

Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!

Service Details

 
.
www.cotse.com
Have you gone to church today?
.
All pages ©1999, 2000, 2001, 2002, 2003 Church of the Swimming Elephant unless otherwise stated
Church of the Swimming Elephant©1999, 2000, 2001, 2002, 2003 Cotse.com.
Cotse.com is a wholly owned subsidiary of Packetderm, LLC.

Packetderm, LLC
210 Park Ave #308
Worcester, MA 01609