purgeerasedfile

Permanently deletes a file that has been marked for deletion.

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

Syntax

  #include <fsio.h> 
   
  int purgeerasedfile (
     const char   *path,
     long          sequence );
  

Parameters

path

(IN) Points to the string containing either the absolute path (including the volume name) or the path name relative to the current working directory of the file to purge.

sequence

(IN) Uniquely identifies the file to purge.

Return Values

If successful, returns 0. Otherwise, returns -1 and sets errno.

Decimal

Constant

Description

9

EINVAL

The path is invalid.

79

ENOTSUP

The operation is not supported on the specified file system.

105

ENOCONTEXT

The calling thread has no context.

Remarks

An application marks a file for deletion with a function such as remove. However, the server does not permanently delete a file until the server needs the disk space occupied by the file marked for deletion. A file marked for deletion can be recovered by calling the salvageerasedfile function.

The purgeerasedfile function permanently deletes a file marked for deletion. It frees the disk space that the deleted file occupied. A file deleted with purgeerasedfile cannot be recovered.

The value for the sequence parameter must be obtained from the scanerasedfiles function. The caller must have Delete rights to the file.

See Also