Permanently deletes a file that has been marked for deletion
#include <nwfinfo.h>
int PurgeErasedFile (
char *pathname,
long sequenceNumber);
(IN) Specifies the string containing either the absolute path (including the volume name) or the relative path name of the file to purge (maximum 255 characters, including the NULL terminator).
(IN) Identifies which version of the specified file to purge.
An application marks a file for deletion with the remove or unlink function. 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 with the remove or unlink functions can be recovered by calling the SalvageErasedFile function.
PurgeErasedFile 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.
NOTE:The sequenceNumber parameter must be obtained from the ScanErasedFiles function. The current connection must have Delete rights to the file.
There is no need to call the ScanErasedFiles function to get a sequence number on remote 286 servers. PurgeErasedFile can be called without regard to the validity of the path name or sequence number on 286 servers. 286 servers do not retain files that have been marked for deletion but not yet purged. PurgeErasedFile purges all files that have been deleted recently (since the last file system operation.
The SetCurrentNameSpace function sets the name space that is used for parsing the path input to PurgeErasedFile.
NOTE:PurgeErasedFile currently works only in the DOS name space. However, you can purge a file in other name spaces in the following way. Call the SetCurrentNameSpace function to change to the DOS name space and then call the ScanErasedFiles function to get the DOS names of the files you want to purge. These are returned in the structure that the ScanErasedFiles function uses. You can then purge the files, supplying their DOS names as specified by the pathname parameter.