NXFileRemoveWithHandle

Removes a file, FIFO, or device by specifying a handle.

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

Syntax

  #include <nks/fsio.h> 
  
  int NXFileRemoveWithHandle (
     NXHandle_t   handle); 
  

Parameters

handle

(IN) Specifies the handle of a previously opened object.

Return Values

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

Decimal

Hex

Constant

Description

4

0x04

NX_EBADF

Invalid handle.

6

0x06

NX_EACCES

Insufficient rights to the object.

24

0x18

NX_EAGAIN

Resource exhaustion prevented successful completion of the call.

65

0x41

NX_ENAMETOOLONG

The filename contents are longer than system permitted name length.

105

0x69

NX_ENOCONTEXT

The calling thread has no NKS context.

Remarks

NXFileRemoveWithHandle marks for deletion a file that is already open. Currently this is supported only on NSS volumes. The directory entry is removed, but the file I/O operations may continue on the file until it is closed at which time the file is completely deleted.

Before deleting a read-only file, its attributes must be changed.

See Also