Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> fsfilesalv()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FSFileSalv()
------------------------------------------------------------------------------
 Purpose:
 Salvage an erased file from the file server.

 Syntax:
 bResult = FSFileSalv( lpszNewName )

 Parameters:
 lpszNewName The filename that the file will have when salvaged

 Returns:
 A boolean value (TRUE or FALSE).

 Description:
 FSFileSalv() returns TRUE if the erased file is successfully salvaged.

 Returns FALSE if not, or if an error occurs.

 Note that FALSE is returned if the filename specified for the salvaged file
 already exists.

 FSFileSalv() can only be called after DirDflLst() returns a
 valid file name.

 Example:
 // To search for and restore the deleted file TEST.DOC with
 // the new name SALVAGED.DOC in the directory SYS:DATA\WP:
 lpszfilename = DirDflLst( "SYS:DATA\WP" )
 ? "Deleted files in directory SYS:DATA\WP"
 ? "File name"
 do while ( !empty( lpszfilename ) )
    if lpszfilename = "TEST.DOC"
       if FSFileSalv("SALVAGED.DOC")
          ? "File salvaged"
       else
          ? "Unable to salvage file"
       endif
       exit
    endif
    lpszfilename = DirDflLst( "" )
 enddo

 Notes:
 FSFileSalv() cannot salvage files that have been permanently
 erased (purged) using either the Novell PURGE utility or the Novlib
 function FSFilPurge().

 It is possible for there to be more than one deleted file with the same
 name.
 If FALSE is returned, check NWErrorGet().

See Also: DirDflLst() FSFilPurge()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson