NXDirRemove

Removes an empty directory entry.

Library:LibC
Classification:NKS
Service:File and Directory I/O

Syntax

  #include <nks/dirio.h> 
   
  int NXDirRemove (
     NXPathCtx_t   pathCtx,
     const void   *pathname);
  

Parameters

pathCtx

(IN) Specifies a file system path context. Along with the pathname parameter, it specifies the directory entry to remove.

pathname

(IN) Points to a null-terminated Unicode or ASCII string, which specifies the name of the directory to remove.

Return Values

If successful, returns 0. Otherwise, returns one of the following error codes:

Decimal

Hex

Constant

Description

1

0x01

NX_ENOENT

A component of the path prefix (as specified by the pathname parameter) does not exist or the pathname parameter is NULL.

4

0x04

NX_EBADF

Invalid path context.

6

0x06

NX_EACCES

Insufficient rights to the object.

7

0x07

NX_EEXIST

The directory is not empty.

9

0x09

NX_EINVAL

The pathCtx parameter was specified, but the pathname parameter indicates a full path.

24

0x18

NX_EAGAIN

Resource exhaustion prevented successful completion.

65

0x41

NX_ENAMETOOLONG

The contents of the pathname parameter are longer than the system-permitted name length.

67

0x43

NX_ENOTDIR

A component of pathname prefix identifies a non-directory object.

68

0x44

NX_ENOTEMPTY

The directory is not empty.

Remarks

NXDirRemove removes an empty subdirectory.

See Also

NXFreePathContext