Salvages a file that has been marked for deletion
#include <nwfinfo.h>
int SalvageErasedFile (
char *pathname,
long sequenceNumber,
char *newFileName);
(IN) Specifies the string containing the path name of the erased file to be salvaged (maximum 255 characters, including the NULL terminator).
(IN) Specifies which version of the specified file to restore.
(IN) Points to a NULL-terminated string containing the name to give the erased file when it is restored (maximum 13 characters, including the NULL terminator).
A file marked for deletion with the remove or unlink function can be recovered by calling the SalvageErasedFile function.
The pathname parameter can be an absolute path with a volume name, or it can be relative to the current working directory.
The sequenceNumber parameter is obtained from the ScanErasedFiles function.
The newFileName parameter can be from 1 to 8 characters long and can also include an extension of from 1 to 3 characters. All letters must be uppercase and the string must be NULL-terminated.
The current connection must have Create rights in the specified directory.
The SetCurrentNameSpace function sets the name space that is used for parsing the path input to rmdir.
NOTE:rmdir currently works only in the DOS name space. However, you can salvage a file in other name spaces in the following way. Call the SetCurrentNameSpace function to change to the DOS name space. Then call the ScanErasedFiles function to get the DOS names of the files you want to salvage. The DOS names are returned in the structure that the ScanErasedFiles function uses. You can then salvage the files, supplying their DOS names to the pathname parameter. After you have salvaged the files, they still have directory entries in the other name spaces that are loaded just as they did before they were deleted.